aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/acpi/scan.c
diff options
context:
space:
mode:
authorPavel Machek <pavel@suse.cz>2008-09-22 17:37:34 -0400
committerLen Brown <len.brown@intel.com>2008-10-10 18:05:53 -0400
commitdb89b4f0dbab837d0f3de2c3e9427a8d5393afa3 (patch)
treee664a0af46cb02d91c699015268d4fa10a6ce190 /drivers/acpi/scan.c
parent9e113e0014204bfb44a2baa29b2a141ede41b074 (diff)
ACPI: catch calls of acpi_driver_data on pointer of wrong type
Catch attempts to use of acpi_driver_data on pointers of wrong type. akpm: rewritten to use proper C typechecking and remove the "function"-used-as-lvalue thing. Signed-off-by: Pavel Machek <pavel@suse.cz> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Len Brown <len.brown@intel.com>
Diffstat (limited to 'drivers/acpi/scan.c')
-rw-r--r--drivers/acpi/scan.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/acpi/scan.c b/drivers/acpi/scan.c
index e7b8853c310b..b88536ab040a 100644
--- a/drivers/acpi/scan.c
+++ b/drivers/acpi/scan.c
@@ -384,7 +384,7 @@ static int acpi_device_remove(struct device * dev)
384 acpi_drv->ops.remove(acpi_dev, acpi_dev->removal_type); 384 acpi_drv->ops.remove(acpi_dev, acpi_dev->removal_type);
385 } 385 }
386 acpi_dev->driver = NULL; 386 acpi_dev->driver = NULL;
387 acpi_driver_data(acpi_dev) = NULL; 387 acpi_dev->driver_data = NULL;
388 388
389 put_device(dev); 389 put_device(dev);
390 return 0; 390 return 0;
@@ -537,7 +537,7 @@ acpi_bus_driver_init(struct acpi_device *device, struct acpi_driver *driver)
537 result = driver->ops.add(device); 537 result = driver->ops.add(device);
538 if (result) { 538 if (result) {
539 device->driver = NULL; 539 device->driver = NULL;
540 acpi_driver_data(device) = NULL; 540 device->driver_data = NULL;
541 return result; 541 return result;
542 } 542 }
543 543