]> git.baikalelectronics.ru Git - kernel.git/commit
libata-acpi: remove redundent code for power resource handling
authorAaron Lu <aaron.lu@intel.com>
Tue, 5 Mar 2013 04:12:04 +0000 (12:12 +0800)
committerJeff Garzik <jgarzik@redhat.com>
Wed, 3 Apr 2013 23:55:32 +0000 (19:55 -0400)
commitdf8d885525c0db311548d6a20d675bcd1f3c6155
tree4e6f36310234eea10b989bc51c76959e4917c198
parent40d79d6dc243361efaf56434f4f6d114a8c1cfca
libata-acpi: remove redundent code for power resource handling

With commit:
4ef4358e996672fa90a586424bfbc3eb12fa8b05
ACPI / PM: Rework the handling of devices depending on power resources

The ACPI core now takes care of the power resources an acpi device
depends on in that when the power resources are turned on, any devices
that are bound to or in the dependent list of this acpi device will be
runtime resumed. So there is no need for ata acpi code to duplicate this
effort, and thus, the ata_acpi_(un)register_power_resource functions are
no longer needed.

The above commit thinks the scsi device is not bound to the acpi device,
so needs to be added to the dependent list. But actually, it is. So
there is no need to add it to the dependent list, or it will be runtime
resumed twice(though this wouldn't cause any problem).

This patch fixes it, and as a result, the
ata_acpi_(un)register_power_resource and ata_acpi_(un)bind functions
are removed.

Signed-off-by: Aaron Lu <aaron.lu@intel.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
drivers/ata/libata-acpi.c
drivers/ata/libata-scsi.c