libata-acpi.c ata_acpi_register_power_resource copy and paste mistake ?
Hi Jeff,
During the last merge of ahci code (d9978ec5680059d727b39d6c706777c6973587f2), i saw this coming by:
drivers/ata/libata-acpi.c +2 -7
@@ -1024,30 +1024,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); }
shouldn't:
acpi_dev_pm_remove_dependent(handle, &sdev->sdev_gendev);
be
acpi_dev_pm_add_dependent(handle, &sdev->sdev_gendev);
in the ata_acpi_register_power_resource function ?
(seems like a copy and paste mistake from the unregister function)
--
Sander
+Rafael
commit bc9b6407bd6df3ab7189e5622816bbc11ae9d2d8
Author: Rafael J. Wysocki <[email protected]> Date: Thu Jan 17 14:11:05 2013 +0100
ACPI / PM: Rework the handling of devices depending on power resources
-Aaron
Quoted 46 lines · Sander Eikelenboom
Hi Jeff,
During the last merge of ahci code (
d9978ec5680059d727b39d6c706777c6973587f2), i saw this coming by:drivers/ata/libata-acpi.c +2
-7@@ -1024,30 +1024,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); }shouldn't:
acpi_dev_pm_remove_dependent(handle, &sdev->sdev_gendev);be
acpi_dev_pm_add_dependent(handle, &sdev->sdev_gendev);in the
ata_acpi_register_power_resourcefunction ?(seems like a copy and paste mistake from the unregister function)
--
Sander--
To unsubscribe from this list: send the line "unsubscribe linux-ide" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Quoted 9 lines · Aaron Lu
+Rafael
commit
bc9b6407bd6df3ab7189e5622816bbc11ae9d2d8Author: Rafael J. Wysocki <[email protected]> Date: Thu Jan 17 14:11:05 2013 +0100ACPI / PM: Rework the handling of devices depending on power resources
-Aaron
Thanks Aaron!
Quoted 29 lines · Sander Eikelenboom
Quoted 28 lines
Hi Jeff,
During the last merge of ahci code (
d9978ec5680059d727b39d6c706777c6973587f2), i saw this coming by:drivers/ata/libata-acpi.c +2
-7@@ -1024,30 +1024,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); }shouldn't:
acpi_dev_pm_remove_dependent(handle, &sdev->sdev_gendev);
Quoted 7 lines
Quoted 7 lines
be
acpi_dev_pm_add_dependent(handle, &sdev->sdev_gendev);in the
ata_acpi_register_power_resourcefunction ?(seems like a copy and paste mistake from the unregister function)
Yes. Sorry, my bad.
If you can prepare a patch fixing this, please do that, or I'll do it tomorrow.
Thanks,
Rafael
Signature · 2 lines
I speak only for myself. Rafael J. Wysocki, Intel Open Source Technology Center.
PATCH 1/1 libata-acpi.c: fix copy and paste mistake in ata_acpi_register_power_resource
Fix a copy and paste mistake introduced in:
commit bc9b6407bd6df3ab7189e5622816bbc11ae9d2d8
"ACPI / PM: Rework the handling of devices depending on power resources"
--- drivers/ata/libata-acpi.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
drivers/ata/libata-acpi.c +1 -1
@@ -1027,7 +1027,7 @@ static void ata_acpi_register_power_resource(struct ata_device *dev) handle =ata_dev_acpi_handle (dev);if (handle) -acpi_dev_pm_remove_dependent (handle, &sdev->sdev_gendev); +acpi_dev_pm_add_dependent (handle, &sdev->sdev_gendev); }static void ata_acpi_unregister_power_resource (struct ata_device *dev)
Signature · 1 line
1.7.2.5
Re: [PATCH] libata-acpi.c: fix copy and paste mistake in ata_acpi_register_power_resource
Quoted 6 lines · Sander Eikelenboom
Fix a copy and paste mistake introduced in:
commit
bc9b6407bd6df3ab7189e5622816bbc11ae9d2d8
"ACPI / PM: Rework the handling of devices depending on power resources"Signed-off-by Sander Eikelenboom <[email protected]>
Quoted 18 lines
--- drivers/ata/libata-acpi.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)drivers/ata/libata-acpi.c +1
-1@@ -1027,7 +1027,7 @@ static void ata_acpi_register_power_resource(struct ata_device *dev) handle =ata_dev_acpi_handle (dev);if (handle) -acpi_dev_pm_remove_dependent (handle, &sdev->sdev_gendev); +acpi_dev_pm_add_dependent (handle, &sdev->sdev_gendev); }static void ata_acpi_unregister_power_resource (struct ata_device *dev)
Signature · 2 lines
I speak only for myself. Rafael J. Wysocki, Intel Open Source Technology Center.
Jeff Garzik
AppliedRe: [PATCH] libata-acpi.c: fix copy and paste mistake in ata_acpi_register_power_resource
In reply to Sander EikelenboomQuoted 9 lines · Sander Eikelenboom
Fix a copy and paste mistake introduced in:
commit
bc9b6407bd6df3ab7189e5622816bbc11ae9d2d8
"ACPI / PM: Rework the handling of devices depending on power resources"Signed-off-by Sander Eikelenboom <[email protected]>--- drivers/ata/libata-acpi.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
applied
PATCH 1/1 libata-acpi.c: fix copy and paste mistake in ata_acpi_register_power_resource
In reply to Rafael J. WysockiFix a copy and paste mistake introduced in:
commit bc9b6407bd6df3ab7189e5622816bbc11ae9d2d8
"ACPI / PM: Rework the handling of devices depending on power resources"
--- drivers/ata/libata-acpi.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
drivers/ata/libata-acpi.c +1 -1
@@ -1027,7 +1027,7 @@ static void ata_acpi_register_power_resource(struct ata_device *dev) handle =ata_dev_acpi_handle (dev);if (handle) -acpi_dev_pm_remove_dependent (handle, &sdev->sdev_gendev); +acpi_dev_pm_add_dependent (handle, &sdev->sdev_gendev); }static void ata_acpi_unregister_power_resource (struct ata_device *dev)
Signature · 1 line
1.7.2.5
PATCH 1/1 libata-acpi.c: fix copy and paste mistake in ata_acpi_register_power_resource
In reply to Rafael J. WysockiFix a copy and paste mistake introduced in:
commit bc9b6407bd6df3ab7189e5622816bbc11ae9d2d8
"ACPI / PM: Rework the handling of devices depending on power resources"
--- drivers/ata/libata-acpi.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
drivers/ata/libata-acpi.c +1 -1
@@ -1027,7 +1027,7 @@ static void ata_acpi_register_power_resource(struct ata_device *dev) handle =ata_dev_acpi_handle (dev);if (handle) -acpi_dev_pm_remove_dependent (handle, &sdev->sdev_gendev); +acpi_dev_pm_add_dependent (handle, &sdev->sdev_gendev); }static void ata_acpi_unregister_power_resource (struct ata_device *dev)
Signature · 1 line
1.7.2.5