mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 11:11:45 -04:00
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
This commit is contained in:
commit
25d412d932
28 changed files with 654 additions and 629 deletions
|
|
@ -178,12 +178,12 @@ static const struct acpi_dock_ops ata_acpi_ap_dock_ops = {
|
|||
/* bind acpi handle to pata port */
|
||||
void ata_acpi_bind_port(struct ata_port *ap)
|
||||
{
|
||||
acpi_handle host_handle = ACPI_HANDLE(ap->host->dev);
|
||||
struct acpi_device *host_companion = ACPI_COMPANION(ap->host->dev);
|
||||
|
||||
if (libata_noacpi || ap->flags & ATA_FLAG_ACPI_SATA || !host_handle)
|
||||
if (libata_noacpi || ap->flags & ATA_FLAG_ACPI_SATA || !host_companion)
|
||||
return;
|
||||
|
||||
acpi_preset_companion(&ap->tdev, host_handle, ap->port_no);
|
||||
acpi_preset_companion(&ap->tdev, host_companion, ap->port_no);
|
||||
|
||||
if (ata_acpi_gtm(ap, &ap->__acpi_init_gtm) == 0)
|
||||
ap->pflags |= ATA_PFLAG_INIT_GTM_VALID;
|
||||
|
|
@ -196,17 +196,17 @@ void ata_acpi_bind_port(struct ata_port *ap)
|
|||
void ata_acpi_bind_dev(struct ata_device *dev)
|
||||
{
|
||||
struct ata_port *ap = dev->link->ap;
|
||||
acpi_handle port_handle = ACPI_HANDLE(&ap->tdev);
|
||||
acpi_handle host_handle = ACPI_HANDLE(ap->host->dev);
|
||||
acpi_handle parent_handle;
|
||||
struct acpi_device *port_companion = ACPI_COMPANION(&ap->tdev);
|
||||
struct acpi_device *host_companion = ACPI_COMPANION(ap->host->dev);
|
||||
struct acpi_device *parent;
|
||||
u64 adr;
|
||||
|
||||
/*
|
||||
* For both sata/pata devices, host handle is required.
|
||||
* For pata device, port handle is also required.
|
||||
* For both sata/pata devices, host companion device is required.
|
||||
* For pata device, port companion device is also required.
|
||||
*/
|
||||
if (libata_noacpi || !host_handle ||
|
||||
(!(ap->flags & ATA_FLAG_ACPI_SATA) && !port_handle))
|
||||
if (libata_noacpi || !host_companion ||
|
||||
(!(ap->flags & ATA_FLAG_ACPI_SATA) && !port_companion))
|
||||
return;
|
||||
|
||||
if (ap->flags & ATA_FLAG_ACPI_SATA) {
|
||||
|
|
@ -214,13 +214,13 @@ void ata_acpi_bind_dev(struct ata_device *dev)
|
|||
adr = SATA_ADR(ap->port_no, NO_PORT_MULT);
|
||||
else
|
||||
adr = SATA_ADR(ap->port_no, dev->link->pmp);
|
||||
parent_handle = host_handle;
|
||||
parent = host_companion;
|
||||
} else {
|
||||
adr = dev->devno;
|
||||
parent_handle = port_handle;
|
||||
parent = port_companion;
|
||||
}
|
||||
|
||||
acpi_preset_companion(&dev->tdev, parent_handle, adr);
|
||||
acpi_preset_companion(&dev->tdev, parent, adr);
|
||||
|
||||
register_hotplug_dock_device(ata_dev_acpi_handle(dev),
|
||||
&ata_acpi_dev_dock_ops, dev, NULL, NULL);
|
||||
|
|
|
|||
Loading…
Reference in a new issue