diff options
Diffstat (limited to 'drivers/acpi')
-rw-r--r-- | drivers/acpi/glue.c | 20 |
1 files changed, 11 insertions, 9 deletions
diff --git a/drivers/acpi/glue.c b/drivers/acpi/glue.c index 10f160dc75b1..a2f46d587d55 100644 --- a/drivers/acpi/glue.c +++ b/drivers/acpi/glue.c | |||
@@ -267,9 +267,9 @@ static int acpi_bind_one(struct device *dev, acpi_handle handle) | |||
267 | { | 267 | { |
268 | acpi_status status; | 268 | acpi_status status; |
269 | 269 | ||
270 | if (dev->firmware_data) { | 270 | if (dev->archdata.acpi_handle) { |
271 | printk(KERN_WARNING PREFIX | 271 | printk(KERN_WARNING PREFIX |
272 | "Drivers changed 'firmware_data' for %s\n", dev->bus_id); | 272 | "Drivers changed 'acpi_handle' for %s\n", dev->bus_id); |
273 | return -EINVAL; | 273 | return -EINVAL; |
274 | } | 274 | } |
275 | get_device(dev); | 275 | get_device(dev); |
@@ -278,25 +278,26 @@ static int acpi_bind_one(struct device *dev, acpi_handle handle) | |||
278 | put_device(dev); | 278 | put_device(dev); |
279 | return -EINVAL; | 279 | return -EINVAL; |
280 | } | 280 | } |
281 | dev->firmware_data = handle; | 281 | dev->archdata.acpi_handle = handle; |
282 | 282 | ||
283 | return 0; | 283 | return 0; |
284 | } | 284 | } |
285 | 285 | ||
286 | static int acpi_unbind_one(struct device *dev) | 286 | static int acpi_unbind_one(struct device *dev) |
287 | { | 287 | { |
288 | if (!dev->firmware_data) | 288 | if (!dev->archdata.acpi_handle) |
289 | return 0; | 289 | return 0; |
290 | if (dev == acpi_get_physical_device(dev->firmware_data)) { | 290 | if (dev == acpi_get_physical_device(dev->archdata.acpi_handle)) { |
291 | /* acpi_get_physical_device increase refcnt by one */ | 291 | /* acpi_get_physical_device increase refcnt by one */ |
292 | put_device(dev); | 292 | put_device(dev); |
293 | acpi_detach_data(dev->firmware_data, acpi_glue_data_handler); | 293 | acpi_detach_data(dev->archdata.acpi_handle, |
294 | dev->firmware_data = NULL; | 294 | acpi_glue_data_handler); |
295 | dev->archdata.acpi_handle = NULL; | ||
295 | /* acpi_bind_one increase refcnt by one */ | 296 | /* acpi_bind_one increase refcnt by one */ |
296 | put_device(dev); | 297 | put_device(dev); |
297 | } else { | 298 | } else { |
298 | printk(KERN_ERR PREFIX | 299 | printk(KERN_ERR PREFIX |
299 | "Oops, 'firmware_data' corrupt for %s\n", dev->bus_id); | 300 | "Oops, 'acpi_handle' corrupt for %s\n", dev->bus_id); |
300 | } | 301 | } |
301 | return 0; | 302 | return 0; |
302 | } | 303 | } |
@@ -328,7 +329,8 @@ static int acpi_platform_notify(struct device *dev) | |||
328 | if (!ret) { | 329 | if (!ret) { |
329 | struct acpi_buffer buffer = { ACPI_ALLOCATE_BUFFER, NULL }; | 330 | struct acpi_buffer buffer = { ACPI_ALLOCATE_BUFFER, NULL }; |
330 | 331 | ||
331 | acpi_get_name(dev->firmware_data, ACPI_FULL_PATHNAME, &buffer); | 332 | acpi_get_name(dev->archdata.acpi_handle, |
333 | ACPI_FULL_PATHNAME, &buffer); | ||
332 | DBG("Device %s -> %s\n", dev->bus_id, (char *)buffer.pointer); | 334 | DBG("Device %s -> %s\n", dev->bus_id, (char *)buffer.pointer); |
333 | kfree(buffer.pointer); | 335 | kfree(buffer.pointer); |
334 | } else | 336 | } else |