diff options
author | Russell King <rmk@dyn-67.arm.linux.org.uk> | 2005-11-09 17:32:44 -0500 |
---|---|---|
committer | Russell King <rmk+kernel@arm.linux.org.uk> | 2005-11-09 17:32:44 -0500 |
commit | 3ae5eaec1d2d9c0cf53745352e7d4b152810ba24 (patch) | |
tree | d8825be54cefb6ad6707478d719c8e30605bee7b /drivers/video/q40fb.c | |
parent | 00d3dcdd96646be6059cc21f2efa94c4edc1eda5 (diff) |
[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 = { | |||
86 | .fb_imageblit = cfb_imageblit, | 86 | .fb_imageblit = cfb_imageblit, |
87 | }; | 87 | }; |
88 | 88 | ||
89 | static int __init q40fb_probe(struct device *device) | 89 | static int __init q40fb_probe(struct platform_device *dev) |
90 | { | 90 | { |
91 | struct platform_device *dev = to_platform_device(device); | ||
92 | struct fb_info *info; | 91 | struct fb_info *info; |
93 | 92 | ||
94 | if (!MACH_IS_Q40) | 93 | if (!MACH_IS_Q40) |
@@ -128,10 +127,11 @@ static int __init q40fb_probe(struct device *device) | |||
128 | return 0; | 127 | return 0; |
129 | } | 128 | } |
130 | 129 | ||
131 | static struct device_driver q40fb_driver = { | 130 | static struct platform_driver q40fb_driver = { |
132 | .name = "q40fb", | ||
133 | .bus = &platform_bus_type, | ||
134 | .probe = q40fb_probe, | 131 | .probe = q40fb_probe, |
132 | .driver = { | ||
133 | .name = "q40fb", | ||
134 | }, | ||
135 | }; | 135 | }; |
136 | 136 | ||
137 | static struct platform_device q40fb_device = { | 137 | static struct platform_device q40fb_device = { |
@@ -145,12 +145,12 @@ int __init q40fb_init(void) | |||
145 | if (fb_get_options("q40fb", NULL)) | 145 | if (fb_get_options("q40fb", NULL)) |
146 | return -ENODEV; | 146 | return -ENODEV; |
147 | 147 | ||
148 | ret = driver_register(&q40fb_driver); | 148 | ret = platform_driver_register(&q40fb_driver); |
149 | 149 | ||
150 | if (!ret) { | 150 | if (!ret) { |
151 | ret = platform_device_register(&q40fb_device); | 151 | ret = platform_device_register(&q40fb_device); |
152 | if (ret) | 152 | if (ret) |
153 | driver_unregister(&q40fb_driver); | 153 | platform_driver_unregister(&q40fb_driver); |
154 | } | 154 | } |
155 | return ret; | 155 | return ret; |
156 | } | 156 | } |