diff options
Diffstat (limited to 'drivers/video')
-rw-r--r-- | drivers/video/arcfb.c | 25 | ||||
-rw-r--r-- | drivers/video/gbefb.c | 18 | ||||
-rw-r--r-- | drivers/video/sgivwfb.c | 24 |
3 files changed, 33 insertions, 34 deletions
diff --git a/drivers/video/arcfb.c b/drivers/video/arcfb.c index 126daff1c848..6aa9f824c185 100644 --- a/drivers/video/arcfb.c +++ b/drivers/video/arcfb.c | |||
@@ -502,10 +502,6 @@ static ssize_t arcfb_write(struct file *file, const char *buf, size_t count, | |||
502 | return err; | 502 | return err; |
503 | } | 503 | } |
504 | 504 | ||
505 | static void arcfb_platform_release(struct device *device) | ||
506 | { | ||
507 | } | ||
508 | |||
509 | static struct fb_ops arcfb_ops = { | 505 | static struct fb_ops arcfb_ops = { |
510 | .owner = THIS_MODULE, | 506 | .owner = THIS_MODULE, |
511 | .fb_open = arcfb_open, | 507 | .fb_open = arcfb_open, |
@@ -624,13 +620,7 @@ static struct device_driver arcfb_driver = { | |||
624 | .remove = arcfb_remove, | 620 | .remove = arcfb_remove, |
625 | }; | 621 | }; |
626 | 622 | ||
627 | static struct platform_device arcfb_device = { | 623 | static struct platform_device *arcfb_device; |
628 | .name = "arcfb", | ||
629 | .id = 0, | ||
630 | .dev = { | ||
631 | .release = arcfb_platform_release, | ||
632 | } | ||
633 | }; | ||
634 | 624 | ||
635 | static int __init arcfb_init(void) | 625 | static int __init arcfb_init(void) |
636 | { | 626 | { |
@@ -641,9 +631,16 @@ static int __init arcfb_init(void) | |||
641 | 631 | ||
642 | ret = driver_register(&arcfb_driver); | 632 | ret = driver_register(&arcfb_driver); |
643 | if (!ret) { | 633 | if (!ret) { |
644 | ret = platform_device_register(&arcfb_device); | 634 | arcfb_device = platform_device_alloc("arcfb", 0); |
645 | if (ret) | 635 | if (arcfb_device) { |
636 | ret = platform_device_add(arcfb_device); | ||
637 | } else { | ||
638 | ret = -ENOMEM; | ||
639 | } | ||
640 | if (ret) { | ||
641 | platform_device_put(arcfb_device); | ||
646 | driver_unregister(&arcfb_driver); | 642 | driver_unregister(&arcfb_driver); |
643 | } | ||
647 | } | 644 | } |
648 | return ret; | 645 | return ret; |
649 | 646 | ||
@@ -651,7 +648,7 @@ static int __init arcfb_init(void) | |||
651 | 648 | ||
652 | static void __exit arcfb_exit(void) | 649 | static void __exit arcfb_exit(void) |
653 | { | 650 | { |
654 | platform_device_unregister(&arcfb_device); | 651 | platform_device_unregister(arcfb_device); |
655 | driver_unregister(&arcfb_driver); | 652 | driver_unregister(&arcfb_driver); |
656 | } | 653 | } |
657 | 654 | ||
diff --git a/drivers/video/gbefb.c b/drivers/video/gbefb.c index 316bfe994811..ed853bef19e9 100644 --- a/drivers/video/gbefb.c +++ b/drivers/video/gbefb.c | |||
@@ -1260,24 +1260,30 @@ static struct device_driver gbefb_driver = { | |||
1260 | .remove = __devexit_p(gbefb_remove), | 1260 | .remove = __devexit_p(gbefb_remove), |
1261 | }; | 1261 | }; |
1262 | 1262 | ||
1263 | static struct platform_device gbefb_device = { | 1263 | static struct platform_device *gbefb_device; |
1264 | .name = "gbefb", | ||
1265 | }; | ||
1266 | 1264 | ||
1267 | int __init gbefb_init(void) | 1265 | int __init gbefb_init(void) |
1268 | { | 1266 | { |
1269 | int ret = driver_register(&gbefb_driver); | 1267 | int ret = driver_register(&gbefb_driver); |
1270 | if (!ret) { | 1268 | if (!ret) { |
1271 | ret = platform_device_register(&gbefb_device); | 1269 | gbefb_device = platform_device_alloc("gbefb", 0); |
1272 | if (ret) | 1270 | if (gbefb_device) { |
1271 | ret = platform_device_add(gbefb_device); | ||
1272 | } else { | ||
1273 | ret = -ENOMEM; | ||
1274 | } | ||
1275 | if (ret) { | ||
1276 | platform_device_put(gbefb_device); | ||
1273 | driver_unregister(&gbefb_driver); | 1277 | driver_unregister(&gbefb_driver); |
1278 | } | ||
1274 | } | 1279 | } |
1275 | return ret; | 1280 | return ret; |
1276 | } | 1281 | } |
1277 | 1282 | ||
1278 | void __exit gbefb_exit(void) | 1283 | void __exit gbefb_exit(void) |
1279 | { | 1284 | { |
1280 | driver_unregister(&gbefb_driver); | 1285 | platform_device_unregister(gbefb_device); |
1286 | driver_unregister(&gbefb_driver); | ||
1281 | } | 1287 | } |
1282 | 1288 | ||
1283 | module_init(gbefb_init); | 1289 | module_init(gbefb_init); |
diff --git a/drivers/video/sgivwfb.c b/drivers/video/sgivwfb.c index cf5106eab2d5..5ce81f44c769 100644 --- a/drivers/video/sgivwfb.c +++ b/drivers/video/sgivwfb.c | |||
@@ -751,10 +751,6 @@ int __init sgivwfb_setup(char *options) | |||
751 | /* | 751 | /* |
752 | * Initialisation | 752 | * Initialisation |
753 | */ | 753 | */ |
754 | static void sgivwfb_release(struct device *device) | ||
755 | { | ||
756 | } | ||
757 | |||
758 | static int __init sgivwfb_probe(struct device *device) | 754 | static int __init sgivwfb_probe(struct device *device) |
759 | { | 755 | { |
760 | struct platform_device *dev = to_platform_device(device); | 756 | struct platform_device *dev = to_platform_device(device); |
@@ -859,13 +855,7 @@ static struct device_driver sgivwfb_driver = { | |||
859 | .remove = sgivwfb_remove, | 855 | .remove = sgivwfb_remove, |
860 | }; | 856 | }; |
861 | 857 | ||
862 | static struct platform_device sgivwfb_device = { | 858 | static struct platform_device *sgivwfb_device; |
863 | .name = "sgivwfb", | ||
864 | .id = 0, | ||
865 | .dev = { | ||
866 | .release = sgivwfb_release, | ||
867 | } | ||
868 | }; | ||
869 | 859 | ||
870 | int __init sgivwfb_init(void) | 860 | int __init sgivwfb_init(void) |
871 | { | 861 | { |
@@ -880,9 +870,15 @@ int __init sgivwfb_init(void) | |||
880 | #endif | 870 | #endif |
881 | ret = driver_register(&sgivwfb_driver); | 871 | ret = driver_register(&sgivwfb_driver); |
882 | if (!ret) { | 872 | if (!ret) { |
883 | ret = platform_device_register(&sgivwfb_device); | 873 | sgivwfb_device = platform_device_alloc("sgivwfb", 0); |
884 | if (ret) | 874 | if (sgivwfb_device) { |
875 | ret = platform_device_add(sgivwfb_device); | ||
876 | } else | ||
877 | ret = -ENOMEM; | ||
878 | if (ret) { | ||
885 | driver_unregister(&sgivwfb_driver); | 879 | driver_unregister(&sgivwfb_driver); |
880 | platform_device_put(sgivwfb_device); | ||
881 | } | ||
886 | } | 882 | } |
887 | return ret; | 883 | return ret; |
888 | } | 884 | } |
@@ -894,7 +890,7 @@ MODULE_LICENSE("GPL"); | |||
894 | 890 | ||
895 | static void __exit sgivwfb_exit(void) | 891 | static void __exit sgivwfb_exit(void) |
896 | { | 892 | { |
897 | platform_device_unregister(&sgivwfb_device); | 893 | platform_device_unregister(sgivwfb_device); |
898 | driver_unregister(&sgivwfb_driver); | 894 | driver_unregister(&sgivwfb_driver); |
899 | } | 895 | } |
900 | 896 | ||