diff options
Diffstat (limited to 'drivers/acpi/glue.c')
-rw-r--r-- | drivers/acpi/glue.c | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/drivers/acpi/glue.c b/drivers/acpi/glue.c index c0d18b2145c1..7608d66f289b 100644 --- a/drivers/acpi/glue.c +++ b/drivers/acpi/glue.c | |||
@@ -37,7 +37,7 @@ int register_acpi_bus_type(struct acpi_bus_type *type) | |||
37 | { | 37 | { |
38 | if (acpi_disabled) | 38 | if (acpi_disabled) |
39 | return -ENODEV; | 39 | return -ENODEV; |
40 | if (type && type->match && type->find_device) { | 40 | if (type && type->match && type->find_companion) { |
41 | down_write(&bus_type_sem); | 41 | down_write(&bus_type_sem); |
42 | list_add_tail(&type->list, &bus_type_list); | 42 | list_add_tail(&type->list, &bus_type_list); |
43 | up_write(&bus_type_sem); | 43 | up_write(&bus_type_sem); |
@@ -302,17 +302,19 @@ EXPORT_SYMBOL_GPL(acpi_unbind_one); | |||
302 | static int acpi_platform_notify(struct device *dev) | 302 | static int acpi_platform_notify(struct device *dev) |
303 | { | 303 | { |
304 | struct acpi_bus_type *type = acpi_get_bus_type(dev); | 304 | struct acpi_bus_type *type = acpi_get_bus_type(dev); |
305 | acpi_handle handle; | ||
306 | int ret; | 305 | int ret; |
307 | 306 | ||
308 | ret = acpi_bind_one(dev, NULL); | 307 | ret = acpi_bind_one(dev, NULL); |
309 | if (ret && type) { | 308 | if (ret && type) { |
310 | ret = type->find_device(dev, &handle); | 309 | struct acpi_device *adev; |
311 | if (ret) { | 310 | |
311 | adev = type->find_companion(dev); | ||
312 | if (!adev) { | ||
312 | DBG("Unable to get handle for %s\n", dev_name(dev)); | 313 | DBG("Unable to get handle for %s\n", dev_name(dev)); |
314 | ret = -ENODEV; | ||
313 | goto out; | 315 | goto out; |
314 | } | 316 | } |
315 | ret = acpi_bind_one(dev, handle); | 317 | ret = acpi_bind_one(dev, adev->handle); |
316 | if (ret) | 318 | if (ret) |
317 | goto out; | 319 | goto out; |
318 | } | 320 | } |