Merge branch 'acpi-pm'
* acpi-pm: (35 commits) ACPI / PM: Handle missing _PSC in acpi_bus_update_power() ACPI / PM: Do not power manage devices in unknown initial states ACPI / PM: Fix acpi_bus_get_device() check in drivers/acpi/device_pm.c ACPI / PM: Fix /proc/acpi/wakeup for devices w/o bus or parent ACPI / PM: Fix consistency check for power resources during resume ACPI / PM: Expose lists of device power resources to user space sysfs: Functions for adding/removing symlinks to/from attribute groups ACPI / PM: Expose current status of ACPI power resources ACPI / PM: Expose power states of ACPI devices to user space ACPI / scan: Prevent device add uevents from racing with user space ACPI / PM: Fix device power state value after transitions to D3cold ACPI / PM: Use string "D3cold" to represent ACPI_STATE_D3_COLD ACPI / PM: Sanitize checks in acpi_power_on_resources() ACPI / PM: Always evaluate _PSn after setting power resources ACPI / PM: Introduce helper for executing _PSn methods ACPI / PM: Make acpi_bus_init_power() more robust ACPI / PM: Fix build for unusual combination of Kconfig options ACPI / PM: remove leading whitespace from #ifdef ACPI / PM: Consolidate suspend-specific and hibernate-specific code ACPI / PM: Move device power management functions to device_pm.c ...
This commit is contained in:
@@ -1029,30 +1029,20 @@ static void ata_acpi_register_power_resource(struct ata_device *dev)
|
||||
{
|
||||
struct scsi_device *sdev = dev->sdev;
|
||||
acpi_handle handle;
|
||||
struct device *device;
|
||||
|
||||
handle = ata_dev_acpi_handle(dev);
|
||||
if (!handle)
|
||||
return;
|
||||
|
||||
device = &sdev->sdev_gendev;
|
||||
|
||||
acpi_power_resource_register_device(device, handle);
|
||||
if (handle)
|
||||
acpi_dev_pm_remove_dependent(handle, &sdev->sdev_gendev);
|
||||
}
|
||||
|
||||
static void ata_acpi_unregister_power_resource(struct ata_device *dev)
|
||||
{
|
||||
struct scsi_device *sdev = dev->sdev;
|
||||
acpi_handle handle;
|
||||
struct device *device;
|
||||
|
||||
handle = ata_dev_acpi_handle(dev);
|
||||
if (!handle)
|
||||
return;
|
||||
|
||||
device = &sdev->sdev_gendev;
|
||||
|
||||
acpi_power_resource_unregister_device(device, handle);
|
||||
if (handle)
|
||||
acpi_dev_pm_remove_dependent(handle, &sdev->sdev_gendev);
|
||||
}
|
||||
|
||||
void ata_acpi_bind(struct ata_device *dev)
|
||||
|
Reference in New Issue
Block a user