diff options
Diffstat (limited to 'drivers/acpi/glue.c')
-rw-r--r-- | drivers/acpi/glue.c | 26 |
1 files changed, 16 insertions, 10 deletions
diff --git a/drivers/acpi/glue.c b/drivers/acpi/glue.c index ba5686fa4750..8a0324b43e53 100644 --- a/drivers/acpi/glue.c +++ b/drivers/acpi/glue.c | |||
@@ -189,8 +189,12 @@ find_pci_rootbridge(acpi_handle handle, u32 lvl, void *context, void **rv) | |||
189 | bus = tmp; | 189 | bus = tmp; |
190 | 190 | ||
191 | if (seg == find->seg && bus == find->bus) | 191 | if (seg == find->seg && bus == find->bus) |
192 | { | ||
192 | find->handle = handle; | 193 | find->handle = handle; |
193 | status = AE_OK; | 194 | status = AE_CTRL_TERMINATE; |
195 | } | ||
196 | else | ||
197 | status = AE_OK; | ||
194 | exit: | 198 | exit: |
195 | kfree(buffer.pointer); | 199 | kfree(buffer.pointer); |
196 | return status; | 200 | return status; |
@@ -267,9 +271,9 @@ static int acpi_bind_one(struct device *dev, acpi_handle handle) | |||
267 | { | 271 | { |
268 | acpi_status status; | 272 | acpi_status status; |
269 | 273 | ||
270 | if (dev->firmware_data) { | 274 | if (dev->archdata.acpi_handle) { |
271 | printk(KERN_WARNING PREFIX | 275 | printk(KERN_WARNING PREFIX |
272 | "Drivers changed 'firmware_data' for %s\n", dev->bus_id); | 276 | "Drivers changed 'acpi_handle' for %s\n", dev->bus_id); |
273 | return -EINVAL; | 277 | return -EINVAL; |
274 | } | 278 | } |
275 | get_device(dev); | 279 | get_device(dev); |
@@ -278,25 +282,26 @@ static int acpi_bind_one(struct device *dev, acpi_handle handle) | |||
278 | put_device(dev); | 282 | put_device(dev); |
279 | return -EINVAL; | 283 | return -EINVAL; |
280 | } | 284 | } |
281 | dev->firmware_data = handle; | 285 | dev->archdata.acpi_handle = handle; |
282 | 286 | ||
283 | return 0; | 287 | return 0; |
284 | } | 288 | } |
285 | 289 | ||
286 | static int acpi_unbind_one(struct device *dev) | 290 | static int acpi_unbind_one(struct device *dev) |
287 | { | 291 | { |
288 | if (!dev->firmware_data) | 292 | if (!dev->archdata.acpi_handle) |
289 | return 0; | 293 | return 0; |
290 | if (dev == acpi_get_physical_device(dev->firmware_data)) { | 294 | if (dev == acpi_get_physical_device(dev->archdata.acpi_handle)) { |
291 | /* acpi_get_physical_device increase refcnt by one */ | 295 | /* acpi_get_physical_device increase refcnt by one */ |
292 | put_device(dev); | 296 | put_device(dev); |
293 | acpi_detach_data(dev->firmware_data, acpi_glue_data_handler); | 297 | acpi_detach_data(dev->archdata.acpi_handle, |
294 | dev->firmware_data = NULL; | 298 | acpi_glue_data_handler); |
299 | dev->archdata.acpi_handle = NULL; | ||
295 | /* acpi_bind_one increase refcnt by one */ | 300 | /* acpi_bind_one increase refcnt by one */ |
296 | put_device(dev); | 301 | put_device(dev); |
297 | } else { | 302 | } else { |
298 | printk(KERN_ERR PREFIX | 303 | printk(KERN_ERR PREFIX |
299 | "Oops, 'firmware_data' corrupt for %s\n", dev->bus_id); | 304 | "Oops, 'acpi_handle' corrupt for %s\n", dev->bus_id); |
300 | } | 305 | } |
301 | return 0; | 306 | return 0; |
302 | } | 307 | } |
@@ -328,7 +333,8 @@ static int acpi_platform_notify(struct device *dev) | |||
328 | if (!ret) { | 333 | if (!ret) { |
329 | struct acpi_buffer buffer = { ACPI_ALLOCATE_BUFFER, NULL }; | 334 | struct acpi_buffer buffer = { ACPI_ALLOCATE_BUFFER, NULL }; |
330 | 335 | ||
331 | acpi_get_name(dev->firmware_data, ACPI_FULL_PATHNAME, &buffer); | 336 | acpi_get_name(dev->archdata.acpi_handle, |
337 | ACPI_FULL_PATHNAME, &buffer); | ||
332 | DBG("Device %s -> %s\n", dev->bus_id, (char *)buffer.pointer); | 338 | DBG("Device %s -> %s\n", dev->bus_id, (char *)buffer.pointer); |
333 | kfree(buffer.pointer); | 339 | kfree(buffer.pointer); |
334 | } else | 340 | } else |