diff options
author | Paul Mackerras <paulus@samba.org> | 2005-11-06 22:42:09 -0500 |
---|---|---|
committer | Paul Mackerras <paulus@samba.org> | 2005-11-06 22:42:09 -0500 |
commit | c6135234550ed89a6fd0e8cb229633967e41d649 (patch) | |
tree | 22cef33e314839c4fb30d6fc888c0caa2a0f6602 /drivers/video/sgivwfb.c | |
parent | 76032de898f34db55b5048349db56557828a1390 (diff) | |
parent | 0b154bb7d0cce80e9c0bcf11d4f9e71b59409d26 (diff) |
Merge ../linux-2.6
Diffstat (limited to 'drivers/video/sgivwfb.c')
-rw-r--r-- | drivers/video/sgivwfb.c | 24 |
1 files changed, 10 insertions, 14 deletions
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 | ||