diff options
author | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2014-01-12 17:45:04 -0500 |
---|---|---|
committer | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2014-01-12 17:45:04 -0500 |
commit | 25d412d932fb3289ae5b510845d523330b80bb71 (patch) | |
tree | 7234bf9bf03af4b0f1f40830169cd7219ef586ed /drivers/ata | |
parent | 98feb7cc61c50fe0fa36eeb994d5db527ca9e103 (diff) | |
parent | c713cd7f2d799c50a0721bf51d178ea9567215dd (diff) |
Merge branch 'acpi-hotplug'
* acpi-hotplug:
ACPI / scan: ACPI device object sysfs attribute for _STA evaluation
ACPI / hotplug / driver core: Handle containers in a special way
ACPI / hotplug: Add demand_offline hotplug profile flag
ACPI / bind: Move acpi_get_child() to drivers/ide/ide-acpi.c
ACPI / bind: Pass struct acpi_device pointer to acpi_bind_one()
ACPI / bind: Rework struct acpi_bus_type
ACPI / bind: Redefine acpi_preset_companion()
ACPI / bind: Redefine acpi_get_child()
PCI / ACPI: Use acpi_find_child_device() for child devices lookup
ACPI / bind: Simplify child device lookups
ACPI / scan: Use direct recurrence for device hierarchy walks
ACPI: Introduce acpi_set_device_status()
ACPI / hotplug: Drop unfinished global notification handling routines
ACPI / hotplug: Rework generic code to handle suprise removals
ACPI / hotplug: Move container-specific code out of the core
ACPI / hotplug: Make ACPI PCI root hotplug use common hotplug code
ACPI / hotplug: Introduce common hotplug function acpi_device_hotplug()
ACPI / hotplug: Do not fail bus and device checks for disabled hotplug
ACPI / scan: Add acpi_device objects for all device nodes in the namespace
ACPI / scan: Define non-empty device removal handler
Diffstat (limited to 'drivers/ata')
-rw-r--r-- | drivers/ata/libata-acpi.c | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/drivers/ata/libata-acpi.c b/drivers/ata/libata-acpi.c index 8e22d9762328..9e69a5308693 100644 --- a/drivers/ata/libata-acpi.c +++ b/drivers/ata/libata-acpi.c | |||
@@ -178,12 +178,12 @@ static const struct acpi_dock_ops ata_acpi_ap_dock_ops = { | |||
178 | /* bind acpi handle to pata port */ | 178 | /* bind acpi handle to pata port */ |
179 | void ata_acpi_bind_port(struct ata_port *ap) | 179 | void ata_acpi_bind_port(struct ata_port *ap) |
180 | { | 180 | { |
181 | acpi_handle host_handle = ACPI_HANDLE(ap->host->dev); | 181 | struct acpi_device *host_companion = ACPI_COMPANION(ap->host->dev); |
182 | 182 | ||
183 | if (libata_noacpi || ap->flags & ATA_FLAG_ACPI_SATA || !host_handle) | 183 | if (libata_noacpi || ap->flags & ATA_FLAG_ACPI_SATA || !host_companion) |
184 | return; | 184 | return; |
185 | 185 | ||
186 | acpi_preset_companion(&ap->tdev, host_handle, ap->port_no); | 186 | acpi_preset_companion(&ap->tdev, host_companion, ap->port_no); |
187 | 187 | ||
188 | if (ata_acpi_gtm(ap, &ap->__acpi_init_gtm) == 0) | 188 | if (ata_acpi_gtm(ap, &ap->__acpi_init_gtm) == 0) |
189 | ap->pflags |= ATA_PFLAG_INIT_GTM_VALID; | 189 | ap->pflags |= ATA_PFLAG_INIT_GTM_VALID; |
@@ -196,17 +196,17 @@ void ata_acpi_bind_port(struct ata_port *ap) | |||
196 | void ata_acpi_bind_dev(struct ata_device *dev) | 196 | void ata_acpi_bind_dev(struct ata_device *dev) |
197 | { | 197 | { |
198 | struct ata_port *ap = dev->link->ap; | 198 | struct ata_port *ap = dev->link->ap; |
199 | acpi_handle port_handle = ACPI_HANDLE(&ap->tdev); | 199 | struct acpi_device *port_companion = ACPI_COMPANION(&ap->tdev); |
200 | acpi_handle host_handle = ACPI_HANDLE(ap->host->dev); | 200 | struct acpi_device *host_companion = ACPI_COMPANION(ap->host->dev); |
201 | acpi_handle parent_handle; | 201 | struct acpi_device *parent; |
202 | u64 adr; | 202 | u64 adr; |
203 | 203 | ||
204 | /* | 204 | /* |
205 | * For both sata/pata devices, host handle is required. | 205 | * For both sata/pata devices, host companion device is required. |
206 | * For pata device, port handle is also required. | 206 | * For pata device, port companion device is also required. |
207 | */ | 207 | */ |
208 | if (libata_noacpi || !host_handle || | 208 | if (libata_noacpi || !host_companion || |
209 | (!(ap->flags & ATA_FLAG_ACPI_SATA) && !port_handle)) | 209 | (!(ap->flags & ATA_FLAG_ACPI_SATA) && !port_companion)) |
210 | return; | 210 | return; |
211 | 211 | ||
212 | if (ap->flags & ATA_FLAG_ACPI_SATA) { | 212 | if (ap->flags & ATA_FLAG_ACPI_SATA) { |
@@ -214,13 +214,13 @@ void ata_acpi_bind_dev(struct ata_device *dev) | |||
214 | adr = SATA_ADR(ap->port_no, NO_PORT_MULT); | 214 | adr = SATA_ADR(ap->port_no, NO_PORT_MULT); |
215 | else | 215 | else |
216 | adr = SATA_ADR(ap->port_no, dev->link->pmp); | 216 | adr = SATA_ADR(ap->port_no, dev->link->pmp); |
217 | parent_handle = host_handle; | 217 | parent = host_companion; |
218 | } else { | 218 | } else { |
219 | adr = dev->devno; | 219 | adr = dev->devno; |
220 | parent_handle = port_handle; | 220 | parent = port_companion; |
221 | } | 221 | } |
222 | 222 | ||
223 | acpi_preset_companion(&dev->tdev, parent_handle, adr); | 223 | acpi_preset_companion(&dev->tdev, parent, adr); |
224 | 224 | ||
225 | register_hotplug_dock_device(ata_dev_acpi_handle(dev), | 225 | register_hotplug_dock_device(ata_dev_acpi_handle(dev), |
226 | &ata_acpi_dev_dock_ops, dev, NULL, NULL); | 226 | &ata_acpi_dev_dock_ops, dev, NULL, NULL); |