X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=drivers%2Fvideo%2Fvesafb.c;h=3e58ddc2bc3829de17a73ddb496ad67ac7624534;hb=f1b8c63ef404367c60dc9b4f68dec33cae3c707b;hp=e25eae1a78c1de86e9f1f7f25103c12708c63a38;hpb=407cf84f956ee4b52da5508d5357b8ae212ff77c;p=linux-2.6 diff --git a/drivers/video/vesafb.c b/drivers/video/vesafb.c index e25eae1a78..3e58ddc2bc 100644 --- a/drivers/video/vesafb.c +++ b/drivers/video/vesafb.c @@ -245,9 +245,8 @@ static int __init vesafb_setup(char *options) return 0; } -static int __init vesafb_probe(struct device *device) +static int __init vesafb_probe(struct platform_device *dev) { - struct platform_device *dev = to_platform_device(device); struct fb_info *info; int i, err; unsigned int size_vmode; @@ -414,6 +413,7 @@ static int __init vesafb_probe(struct device *device) * region already (FIXME) */ request_region(0x3c0, 32, "vesafb"); +#ifdef CONFIG_MTRR if (mtrr) { unsigned int temp_size = size_total; unsigned int type = 0; @@ -451,6 +451,7 @@ static int __init vesafb_probe(struct device *device) } while (temp_size >= PAGE_SIZE && rc == -EINVAL); } } +#endif info->fbops = &vesafb_ops; info->var = vesafb_defined; @@ -480,10 +481,11 @@ err: return err; } -static struct device_driver vesafb_driver = { - .name = "vesafb", - .bus = &platform_bus_type, +static struct platform_driver vesafb_driver = { .probe = vesafb_probe, + .driver = { + .name = "vesafb", + }, }; static struct platform_device vesafb_device = { @@ -498,12 +500,12 @@ static int __init vesafb_init(void) /* ignore error return of fb_get_options */ fb_get_options("vesafb", &option); vesafb_setup(option); - ret = driver_register(&vesafb_driver); + ret = platform_driver_register(&vesafb_driver); if (!ret) { ret = platform_device_register(&vesafb_device); if (ret) - driver_unregister(&vesafb_driver); + platform_driver_unregister(&vesafb_driver); } return ret; }