[prev in list] [next in list] [prev in thread] [next in thread]
List: linux-scsi
Subject: [PATCHv2 6/8] libata: Generate and pass correct acpi handles
From: Holger Macht <holger () homac ! de>
Date: 2012-01-20 0:19:08
Message-ID: 20120120001907.GG27706 () homac ! suse ! de
[Download RAW message or body]
Fix ACPI handle generation for device handles and pass the correct
handles to the dock driver.
Signed-off-by: Holger Macht <holger@homac.de>
---
drivers/ata/libata-acpi.c | 10 +++-------
1 files changed, 3 insertions(+), 7 deletions(-)
diff --git a/drivers/ata/libata-acpi.c b/drivers/ata/libata-acpi.c
index 3531ff7..3595ef4 100644
--- a/drivers/ata/libata-acpi.c
+++ b/drivers/ata/libata-acpi.c
@@ -74,9 +74,6 @@ acpi_handle ata_dev_acpi_handle(struct ata_device *dev)
acpi_integer adr;
struct ata_port *ap = dev->link->ap;
- if (dev->sdev)
- return DEVICE_ACPI_HANDLE(&dev->sdev->sdev_gendev);
-
if (ap->flags & ATA_FLAG_ACPI_SATA) {
if (!sata_pmp_attached(ap))
adr = SATA_ADR(ap->port_no, NO_PORT_MULT);
@@ -1004,8 +1001,7 @@ static int ata_acpi_bind_host(struct device *dev, int host, acpi_handle *handle)
if (!*handle)
return -ENODEV;
- register_hotplug_dock_device(ata_ap_acpi_handle(ap),
- &ata_acpi_ap_dock_ops, ap);
+ register_hotplug_dock_device(*handle, &ata_acpi_ap_dock_ops, ap);
return 0;
}
@@ -1027,8 +1023,8 @@ static int ata_acpi_bind_device(struct device *dev, int channel, int id,
if (!*handle)
return -ENODEV;
- register_hotplug_dock_device(ata_dev_acpi_handle(ata_dev),
- &ata_acpi_dev_dock_ops, ata_dev);
+
+ register_hotplug_dock_device(*handle, &ata_acpi_dev_dock_ops, ata_dev);
return 0;
}
--
1.7.8
--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic