diff options
author | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2013-06-15 18:36:41 -0400 |
---|---|---|
committer | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2013-06-19 19:25:19 -0400 |
commit | 24071f472d813fccacc1ef7356b1f41422a1b968 (patch) | |
tree | ecff2a9d976919b434a2a410d03317a1b8e0ea3a | |
parent | 66345d5f79fcfa0214f5d98763643d4ee8e6965d (diff) |
ACPI / scan: Do not bind ACPI drivers to objects with scan handlers
ACPI drivers must not be bound to device objects having scan handlers
attatched to them, so make acpi_device_probe() fail with -EINVAL if the
device object being probed has an ACPI scan handler.
After this change the analogous check introduced into the ACPI video
driver by commit 8c9b7a7 (ACPI / video: Do not bind to device objects
with a scan handler) is not necessary any more and may be dropped, so
drop it.
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Tested-by: Tony Luck <tony.luck@gmail.com>
Acked-by: Toshi Kani <toshi.kani@hp.com>
-rw-r--r-- | drivers/acpi/scan.c | 3 | ||||
-rw-r--r-- | drivers/acpi/video.c | 3 |
2 files changed, 3 insertions, 3 deletions
diff --git a/drivers/acpi/scan.c b/drivers/acpi/scan.c index 4eeea2262454..54529424a0a5 100644 --- a/drivers/acpi/scan.c +++ b/drivers/acpi/scan.c | |||
@@ -822,6 +822,9 @@ static int acpi_device_probe(struct device *dev) | |||
822 | struct acpi_driver *acpi_drv = to_acpi_driver(dev->driver); | 822 | struct acpi_driver *acpi_drv = to_acpi_driver(dev->driver); |
823 | int ret; | 823 | int ret; |
824 | 824 | ||
825 | if (acpi_dev->handler) | ||
826 | return -EINVAL; | ||
827 | |||
825 | if (!acpi_drv->ops.add) | 828 | if (!acpi_drv->ops.add) |
826 | return -ENOSYS; | 829 | return -ENOSYS; |
827 | 830 | ||
diff --git a/drivers/acpi/video.c b/drivers/acpi/video.c index 440eadf2d32c..5d7075d25700 100644 --- a/drivers/acpi/video.c +++ b/drivers/acpi/video.c | |||
@@ -1722,9 +1722,6 @@ static int acpi_video_bus_add(struct acpi_device *device) | |||
1722 | int error; | 1722 | int error; |
1723 | acpi_status status; | 1723 | acpi_status status; |
1724 | 1724 | ||
1725 | if (device->handler) | ||
1726 | return -EINVAL; | ||
1727 | |||
1728 | status = acpi_walk_namespace(ACPI_TYPE_DEVICE, | 1725 | status = acpi_walk_namespace(ACPI_TYPE_DEVICE, |
1729 | device->parent->handle, 1, | 1726 | device->parent->handle, 1, |
1730 | acpi_video_bus_match, NULL, | 1727 | acpi_video_bus_match, NULL, |