]> rtime.felk.cvut.cz Git - linux-imx.git/blobdiff - include/acpi/acpi_bus.h
ACPI / PM: Allow device power states to be used for CONFIG_PM unset
[linux-imx.git] / include / acpi / acpi_bus.h
index 98db31d9f9b410908b2056b192bf9813bc8ce4aa..636c59f2003a315c264777eccd0e3abfbdd8045f 100644 (file)
@@ -377,7 +377,6 @@ acpi_status acpi_bus_get_status_handle(acpi_handle handle,
                                       unsigned long long *sta);
 int acpi_bus_get_status(struct acpi_device *device);
 
-#ifdef CONFIG_PM
 int acpi_bus_set_power(acpi_handle handle, int state);
 const char *acpi_power_state_string(int state);
 int acpi_device_get_power(struct acpi_device *device, int *state);
@@ -385,41 +384,12 @@ int acpi_device_set_power(struct acpi_device *device, int state);
 int acpi_bus_init_power(struct acpi_device *device);
 int acpi_bus_update_power(acpi_handle handle, int *state_p);
 bool acpi_bus_power_manageable(acpi_handle handle);
+
+#ifdef CONFIG_PM
 bool acpi_bus_can_wakeup(acpi_handle handle);
-#else /* !CONFIG_PM */
-static inline int acpi_bus_set_power(acpi_handle handle, int state)
-{
-       return 0;
-}
-static inline const char *acpi_power_state_string(int state)
-{
-       return "D0";
-}
-static inline int acpi_device_get_power(struct acpi_device *device, int *state)
-{
-       return 0;
-}
-static inline int acpi_device_set_power(struct acpi_device *device, int state)
-{
-       return 0;
-}
-static inline int acpi_bus_init_power(struct acpi_device *device)
-{
-       return 0;
-}
-static inline int acpi_bus_update_power(acpi_handle handle, int *state_p)
-{
-       return 0;
-}
-static inline bool acpi_bus_power_manageable(acpi_handle handle)
-{
-       return false;
-}
-static inline bool acpi_bus_can_wakeup(acpi_handle handle)
-{
-       return false;
-}
-#endif /* !CONFIG_PM */
+#else
+static inline bool acpi_bus_can_wakeup(acpi_handle handle) { return false; }
+#endif
 
 #ifdef CONFIG_ACPI_PROC_EVENT
 int acpi_bus_generate_proc_event(struct acpi_device *device, u8 type, int data);