X-Git-Url: http://pilppa.org/gitweb/gitweb.cgi?a=blobdiff_plain;f=drivers%2Fvideo%2Fq40fb.c;h=48536c3e58a41afec3f6eb7bf7d7c6f17e22229c;hb=40caf5ea5a7d47f8a33e26b63ca81dea4b5109d2;hp=bfc41f2c902a2d93576b3a86f051b927a4e692bd;hpb=8cde0776ec1e86c270f65bf482f96288e6bf0023;p=linux-2.6-omap-h63xx.git diff --git a/drivers/video/q40fb.c b/drivers/video/q40fb.c index bfc41f2c902..48536c3e58a 100644 --- a/drivers/video/q40fb.c +++ b/drivers/video/q40fb.c @@ -14,7 +14,6 @@ #include #include #include -#include #include #include #include @@ -86,9 +85,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 +126,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 +144,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; }