ACPI / PM: Add function for device power state initialization
Add function acpi_bus_init_power() for getting the initial power state of an ACPI device and reference counting its power resources as appropriate. Make acpi_bus_get_power_flags() use the new function instead of acpi_bus_get_power() that updates device->power.state without reference counting the device's power resources. Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl> Signed-off-by: Len Brown <len.brown@intel.com>
This commit is contained in:
committed by
Len Brown
parent
5e6d4fe429
commit
ade3e7fef7
@@ -44,6 +44,7 @@ int acpi_device_sleep_wake(struct acpi_device *dev,
|
||||
int acpi_power_get_inferred_state(struct acpi_device *device, int *state);
|
||||
int acpi_power_on_resources(struct acpi_device *device, int state);
|
||||
int acpi_power_transition(struct acpi_device *device, int state);
|
||||
int acpi_bus_init_power(struct acpi_device *device);
|
||||
extern int acpi_power_nocheck;
|
||||
|
||||
int acpi_wakeup_device_init(void);
|
||||
|
Reference in New Issue
Block a user