diff options
author | Paul Gortmaker <paul.gortmaker@windriver.com> | 2016-02-21 22:13:12 -0500 |
---|---|---|
committer | Tomi Valkeinen <tomi.valkeinen@ti.com> | 2016-03-03 06:36:51 -0500 |
commit | c15222bdec75890d2523479615bc175956a9eadb (patch) | |
tree | 425bd56207d889166218df20b954dfdc36c726c7 | |
parent | 27844cb8101f1ea60984e04c70126dc754ae97a1 (diff) |
drivers/video: make fbdev/sunxvr2500.c explicitly non-modular
The Kconfig currently controlling compilation of this code is:
config FB_XVR2500
bool "Sun XVR-2500 3DLABS Wildcat support"
...meaning that it currently is not being built as a module by anyone.
Lets remove the modular code that is essentially orphaned, so that
when reading the driver there is no doubt it is builtin-only.
Since module_init translates to device_initcall in the non-modular
case, the init ordering remains unchanged with this commit.
We explicitly disallow a driver unbind, since that doesn't have a
sensible use case anyway, and it allows us to drop the ".remove"
code for non-modular drivers.
We don't replace module.h with init.h since the file already has that.
We also delete the MODULE_LICENSE tag etc. since all that information
was (or is now) contained at the top of the file in the comments.
Cc: Jean-Christophe Plagniol-Villard <plagnioj@jcrosoft.com>
Cc: Tomi Valkeinen <tomi.valkeinen@ti.com>
Cc: "David S. Miller" <davem@davemloft.net>
Cc: sparclinux@vger.kernel.org
Cc: linux-fbdev@vger.kernel.org
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
-rw-r--r-- | drivers/video/fbdev/sunxvr2500.c | 39 |
1 files changed, 7 insertions, 32 deletions
diff --git a/drivers/video/fbdev/sunxvr2500.c b/drivers/video/fbdev/sunxvr2500.c index 843b6bab0483..1a053292f2eb 100644 --- a/drivers/video/fbdev/sunxvr2500.c +++ b/drivers/video/fbdev/sunxvr2500.c | |||
@@ -1,9 +1,10 @@ | |||
1 | /* s3d.c: Sun 3DLABS XVR-2500 et al. driver for sparc64 systems | 1 | /* sunxvr2500.c: Sun 3DLABS XVR-2500 et al. fb driver for sparc64 systems |
2 | * | ||
3 | * License: GPL | ||
2 | * | 4 | * |
3 | * Copyright (C) 2007 David S. Miller (davem@davemloft.net) | 5 | * Copyright (C) 2007 David S. Miller (davem@davemloft.net) |
4 | */ | 6 | */ |
5 | 7 | ||
6 | #include <linux/module.h> | ||
7 | #include <linux/kernel.h> | 8 | #include <linux/kernel.h> |
8 | #include <linux/fb.h> | 9 | #include <linux/fb.h> |
9 | #include <linux/pci.h> | 10 | #include <linux/pci.h> |
@@ -219,22 +220,6 @@ err_out: | |||
219 | return err; | 220 | return err; |
220 | } | 221 | } |
221 | 222 | ||
222 | static void s3d_pci_unregister(struct pci_dev *pdev) | ||
223 | { | ||
224 | struct fb_info *info = pci_get_drvdata(pdev); | ||
225 | struct s3d_info *sp = info->par; | ||
226 | |||
227 | unregister_framebuffer(info); | ||
228 | |||
229 | iounmap(sp->fb_base); | ||
230 | |||
231 | pci_release_region(pdev, 1); | ||
232 | |||
233 | framebuffer_release(info); | ||
234 | |||
235 | pci_disable_device(pdev); | ||
236 | } | ||
237 | |||
238 | static struct pci_device_id s3d_pci_table[] = { | 223 | static struct pci_device_id s3d_pci_table[] = { |
239 | { PCI_DEVICE(PCI_VENDOR_ID_3DLABS, 0x002c), }, | 224 | { PCI_DEVICE(PCI_VENDOR_ID_3DLABS, 0x002c), }, |
240 | { PCI_DEVICE(PCI_VENDOR_ID_3DLABS, 0x002d), }, | 225 | { PCI_DEVICE(PCI_VENDOR_ID_3DLABS, 0x002d), }, |
@@ -248,10 +233,12 @@ static struct pci_device_id s3d_pci_table[] = { | |||
248 | }; | 233 | }; |
249 | 234 | ||
250 | static struct pci_driver s3d_driver = { | 235 | static struct pci_driver s3d_driver = { |
236 | .driver = { | ||
237 | .suppress_bind_attrs = true, | ||
238 | }, | ||
251 | .name = "s3d", | 239 | .name = "s3d", |
252 | .id_table = s3d_pci_table, | 240 | .id_table = s3d_pci_table, |
253 | .probe = s3d_pci_register, | 241 | .probe = s3d_pci_register, |
254 | .remove = s3d_pci_unregister, | ||
255 | }; | 242 | }; |
256 | 243 | ||
257 | static int __init s3d_init(void) | 244 | static int __init s3d_init(void) |
@@ -261,16 +248,4 @@ static int __init s3d_init(void) | |||
261 | 248 | ||
262 | return pci_register_driver(&s3d_driver); | 249 | return pci_register_driver(&s3d_driver); |
263 | } | 250 | } |
264 | 251 | device_initcall(s3d_init); | |
265 | static void __exit s3d_exit(void) | ||
266 | { | ||
267 | pci_unregister_driver(&s3d_driver); | ||
268 | } | ||
269 | |||
270 | module_init(s3d_init); | ||
271 | module_exit(s3d_exit); | ||
272 | |||
273 | MODULE_DESCRIPTION("framebuffer driver for Sun XVR-2500 graphics"); | ||
274 | MODULE_AUTHOR("David S. Miller <davem@davemloft.net>"); | ||
275 | MODULE_VERSION("1.0"); | ||
276 | MODULE_LICENSE("GPL"); | ||