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>
This commit is contained in:
parent
66345d5f79
commit
24071f472d
|
@ -822,6 +822,9 @@ static int acpi_device_probe(struct device *dev)
|
||||||
struct acpi_driver *acpi_drv = to_acpi_driver(dev->driver);
|
struct acpi_driver *acpi_drv = to_acpi_driver(dev->driver);
|
||||||
int ret;
|
int ret;
|
||||||
|
|
||||||
|
if (acpi_dev->handler)
|
||||||
|
return -EINVAL;
|
||||||
|
|
||||||
if (!acpi_drv->ops.add)
|
if (!acpi_drv->ops.add)
|
||||||
return -ENOSYS;
|
return -ENOSYS;
|
||||||
|
|
||||||
|
|
|
@ -1722,9 +1722,6 @@ static int acpi_video_bus_add(struct acpi_device *device)
|
||||||
int error;
|
int error;
|
||||||
acpi_status status;
|
acpi_status status;
|
||||||
|
|
||||||
if (device->handler)
|
|
||||||
return -EINVAL;
|
|
||||||
|
|
||||||
status = acpi_walk_namespace(ACPI_TYPE_DEVICE,
|
status = acpi_walk_namespace(ACPI_TYPE_DEVICE,
|
||||||
device->parent->handle, 1,
|
device->parent->handle, 1,
|
||||||
acpi_video_bus_match, NULL,
|
acpi_video_bus_match, NULL,
|
||||||
|
|
Loading…
Reference in New Issue