aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/pnp
diff options
context:
space:
mode:
authorRafael J. Wysocki <rafael.j.wysocki@intel.com>2014-01-12 17:45:04 -0500
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>2014-01-12 17:45:04 -0500
commit25d412d932fb3289ae5b510845d523330b80bb71 (patch)
tree7234bf9bf03af4b0f1f40830169cd7219ef586ed /drivers/pnp
parent98feb7cc61c50fe0fa36eeb994d5db527ca9e103 (diff)
parentc713cd7f2d799c50a0721bf51d178ea9567215dd (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/pnp')
-rw-r--r--drivers/pnp/pnpacpi/core.c21
1 files changed, 8 insertions, 13 deletions
diff --git a/drivers/pnp/pnpacpi/core.c b/drivers/pnp/pnpacpi/core.c
index e869ba698ac0..156d14e2587e 100644
--- a/drivers/pnp/pnpacpi/core.c
+++ b/drivers/pnp/pnpacpi/core.c
@@ -328,20 +328,15 @@ static int __init acpi_pnp_match(struct device *dev, void *_pnp)
328 && compare_pnp_id(pnp->id, acpi_device_hid(acpi)); 328 && compare_pnp_id(pnp->id, acpi_device_hid(acpi));
329} 329}
330 330
331static int __init acpi_pnp_find_device(struct device *dev, acpi_handle * handle) 331static struct acpi_device * __init acpi_pnp_find_companion(struct device *dev)
332{ 332{
333 struct device *adev; 333 dev = bus_find_device(&acpi_bus_type, NULL, to_pnp_dev(dev),
334 struct acpi_device *acpi; 334 acpi_pnp_match);
335 335 if (!dev)
336 adev = bus_find_device(&acpi_bus_type, NULL, 336 return NULL;
337 to_pnp_dev(dev), acpi_pnp_match);
338 if (!adev)
339 return -ENODEV;
340 337
341 acpi = to_acpi_device(adev); 338 put_device(dev);
342 *handle = acpi->handle; 339 return to_acpi_device(dev);
343 put_device(adev);
344 return 0;
345} 340}
346 341
347/* complete initialization of a PNPACPI device includes having 342/* complete initialization of a PNPACPI device includes having
@@ -355,7 +350,7 @@ static bool acpi_pnp_bus_match(struct device *dev)
355static struct acpi_bus_type __initdata acpi_pnp_bus = { 350static struct acpi_bus_type __initdata acpi_pnp_bus = {
356 .name = "PNP", 351 .name = "PNP",
357 .match = acpi_pnp_bus_match, 352 .match = acpi_pnp_bus_match,
358 .find_device = acpi_pnp_find_device, 353 .find_companion = acpi_pnp_find_companion,
359}; 354};
360 355
361int pnpacpi_disabled __initdata; 356int pnpacpi_disabled __initdata;