diff options
Diffstat (limited to 'drivers/acpi/glue.c')
-rw-r--r-- | drivers/acpi/glue.c | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/drivers/acpi/glue.c b/drivers/acpi/glue.c index 40a84cc6740c..f68095756fb7 100644 --- a/drivers/acpi/glue.c +++ b/drivers/acpi/glue.c | |||
@@ -81,13 +81,15 @@ static struct acpi_bus_type *acpi_get_bus_type(struct device *dev) | |||
81 | static acpi_status do_acpi_find_child(acpi_handle handle, u32 lvl_not_used, | 81 | static acpi_status do_acpi_find_child(acpi_handle handle, u32 lvl_not_used, |
82 | void *addr_p, void **ret_p) | 82 | void *addr_p, void **ret_p) |
83 | { | 83 | { |
84 | unsigned long long addr; | 84 | unsigned long long addr, sta; |
85 | acpi_status status; | 85 | acpi_status status; |
86 | 86 | ||
87 | status = acpi_evaluate_integer(handle, METHOD_NAME__ADR, NULL, &addr); | 87 | status = acpi_evaluate_integer(handle, METHOD_NAME__ADR, NULL, &addr); |
88 | if (ACPI_SUCCESS(status) && addr == *((u64 *)addr_p)) { | 88 | if (ACPI_SUCCESS(status) && addr == *((u64 *)addr_p)) { |
89 | *ret_p = handle; | 89 | *ret_p = handle; |
90 | return AE_CTRL_TERMINATE; | 90 | status = acpi_bus_get_status_handle(handle, &sta); |
91 | if (ACPI_SUCCESS(status) && (sta & ACPI_STA_DEVICE_ENABLED)) | ||
92 | return AE_CTRL_TERMINATE; | ||
91 | } | 93 | } |
92 | return AE_OK; | 94 | return AE_OK; |
93 | } | 95 | } |
@@ -105,7 +107,7 @@ acpi_handle acpi_get_child(acpi_handle parent, u64 address) | |||
105 | } | 107 | } |
106 | EXPORT_SYMBOL(acpi_get_child); | 108 | EXPORT_SYMBOL(acpi_get_child); |
107 | 109 | ||
108 | static int acpi_bind_one(struct device *dev, acpi_handle handle) | 110 | int acpi_bind_one(struct device *dev, acpi_handle handle) |
109 | { | 111 | { |
110 | struct acpi_device *acpi_dev; | 112 | struct acpi_device *acpi_dev; |
111 | acpi_status status; | 113 | acpi_status status; |
@@ -188,8 +190,9 @@ static int acpi_bind_one(struct device *dev, acpi_handle handle) | |||
188 | kfree(physical_node); | 190 | kfree(physical_node); |
189 | goto err; | 191 | goto err; |
190 | } | 192 | } |
193 | EXPORT_SYMBOL_GPL(acpi_bind_one); | ||
191 | 194 | ||
192 | static int acpi_unbind_one(struct device *dev) | 195 | int acpi_unbind_one(struct device *dev) |
193 | { | 196 | { |
194 | struct acpi_device_physical_node *entry; | 197 | struct acpi_device_physical_node *entry; |
195 | struct acpi_device *acpi_dev; | 198 | struct acpi_device *acpi_dev; |
@@ -238,6 +241,7 @@ err: | |||
238 | dev_err(dev, "Oops, 'acpi_handle' corrupt\n"); | 241 | dev_err(dev, "Oops, 'acpi_handle' corrupt\n"); |
239 | return -EINVAL; | 242 | return -EINVAL; |
240 | } | 243 | } |
244 | EXPORT_SYMBOL_GPL(acpi_unbind_one); | ||
241 | 245 | ||
242 | static int acpi_platform_notify(struct device *dev) | 246 | static int acpi_platform_notify(struct device *dev) |
243 | { | 247 | { |