X-Git-Url: http://pilppa.org/gitweb/gitweb.cgi?a=blobdiff_plain;f=drivers%2Fvideo%2Fq40fb.c;h=4beac1df617b0ab9f6c909df4b5dc1ec1473afed;hb=64c2eae225137a8f5a88b6a416fc182d36e8ae9f;hp=bfc41f2c902a2d93576b3a86f051b927a4e692bd;hpb=3133c5e896c0b2509e72ae0c2cb9452c80d47f46;p=linux-2.6-omap-h63xx.git diff --git a/drivers/video/q40fb.c b/drivers/video/q40fb.c index bfc41f2c902..4beac1df617 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) @@ -97,7 +95,7 @@ static int __init q40fb_probe(struct device *device) /* mapped in q40/config.c */ q40fb_fix.smem_start = Q40_PHYS_SCREEN_ADDR; - info = framebuffer_alloc(sizeof(u32) * 256, &dev->dev); + info = framebuffer_alloc(sizeof(u32) * 16, &dev->dev); if (!info) return -ENOMEM; @@ -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; }