aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/acpi/video.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/video.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/video.c')
-rw-r--r--drivers/acpi/video.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/acpi/video.c b/drivers/acpi/video.c
index e8a51a1700f7..85c6554bcb4c 100644
--- a/drivers/acpi/video.c
+++ b/drivers/acpi/video.c
@@ -1491,7 +1491,7 @@ acpi_video_bus_get_one_device(struct acpi_device *device,
1491 1491
1492 strcpy(acpi_device_name(device), ACPI_VIDEO_DEVICE_NAME); 1492 strcpy(acpi_device_name(device), ACPI_VIDEO_DEVICE_NAME);
1493 strcpy(acpi_device_class(device), ACPI_VIDEO_CLASS); 1493 strcpy(acpi_device_class(device), ACPI_VIDEO_CLASS);
1494 acpi_driver_data(device) = data; 1494 device->driver_data = data;
1495 1495
1496 data->device_id = device_id; 1496 data->device_id = device_id;
1497 data->video = video; 1497 data->video = video;
@@ -1982,7 +1982,7 @@ static int acpi_video_bus_add(struct acpi_device *device)
1982 video->device = device; 1982 video->device = device;
1983 strcpy(acpi_device_name(device), ACPI_VIDEO_BUS_NAME); 1983 strcpy(acpi_device_name(device), ACPI_VIDEO_BUS_NAME);
1984 strcpy(acpi_device_class(device), ACPI_VIDEO_CLASS); 1984 strcpy(acpi_device_class(device), ACPI_VIDEO_CLASS);
1985 acpi_driver_data(device) = video; 1985 device->driver_data = video;
1986 1986
1987 acpi_video_bus_find_cap(video); 1987 acpi_video_bus_find_cap(video);
1988 error = acpi_video_bus_check(video); 1988 error = acpi_video_bus_check(video);
@@ -2058,7 +2058,7 @@ static int acpi_video_bus_add(struct acpi_device *device)
2058 acpi_video_bus_remove_fs(device); 2058 acpi_video_bus_remove_fs(device);
2059 err_free_video: 2059 err_free_video:
2060 kfree(video); 2060 kfree(video);
2061 acpi_driver_data(device) = NULL; 2061 device->driver_data = NULL;
2062 2062
2063 return error; 2063 return error;
2064} 2064}