diff options
author | Russell King <rmk@dyn-67.arm.linux.org.uk> | 2005-11-09 23:32:44 +0100 |
---|---|---|
committer | Russell King <rmk+kernel@arm.linux.org.uk> | 2005-11-09 23:32:44 +0100 |
commit | 3ae5eaec1d2d9c0cf53745352e7d4b152810ba24 (patch) | |
tree | d8825be54cefb6ad6707478d719c8e30605bee7b /drivers/video/q40fb.c | |
parent | [DRIVER MODEL] Add platform_driver (diff) | |
download | linux-3ae5eaec1d2d9c0cf53745352e7d4b152810ba24.tar.xz linux-3ae5eaec1d2d9c0cf53745352e7d4b152810ba24.zip |
[DRIVER MODEL] Convert platform drivers to use struct platform_driver
This allows us to eliminate the casts in the drivers, and eventually
remove the use of the device_driver function pointer methods for
platform device drivers.
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Acked-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/video/q40fb.c')
-rw-r--r-- | drivers/video/q40fb.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/drivers/video/q40fb.c b/drivers/video/q40fb.c index bfc41f2c902a..fc91dbf896d2 100644 --- a/drivers/video/q40fb.c +++ b/drivers/video/q40fb.c @@ -86,9 +86,8 @@ static struct fb_ops q40fb_ops = { .fb_imageblit = cfb_imageblit, }; -static int __init q40fb_probe(struct device *device) +static int __init q40fb_probe(struct platform_device *dev) { - struct platform_device *dev = to_platform_device(device); struct fb_info *info; if (!MACH_IS_Q40) @@ -128,10 +127,11 @@ static int __init q40fb_probe(struct device *device) return 0; } -static struct device_driver q40fb_driver = { - .name = "q40fb", - .bus = &platform_bus_type, +static struct platform_driver q40fb_driver = { .probe = q40fb_probe, + .driver = { + .name = "q40fb", + }, }; static struct platform_device q40fb_device = { @@ -145,12 +145,12 @@ int __init q40fb_init(void) if (fb_get_options("q40fb", NULL)) return -ENODEV; - ret = driver_register(&q40fb_driver); + ret = platform_driver_register(&q40fb_driver); if (!ret) { ret = platform_device_register(&q40fb_device); if (ret) - driver_unregister(&q40fb_driver); + platform_driver_unregister(&q40fb_driver); } return ret; } |