aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPaul Gortmaker <paul.gortmaker@windriver.com>2016-02-21 22:13:10 -0500
committerTomi Valkeinen <tomi.valkeinen@ti.com>2016-03-03 06:36:51 -0500
commitd61b0ef7184f3b5a7e068f503ccaa6e2701c00ea (patch)
tree793abf834609d4eae73093d9a9d1d09cc0f7220d
parent5a63ddf60ee105a484501fd0d569923080592c0a (diff)
drivers/video: make fbdev/sunxvr500.c explicitly non-modular
The Kconfig currently controlling compilation of this code is: config FB_XVR500 bool "Sun XVR-500 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. 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. Since module_init translates to device_initcall in the non-modular case, the init ordering remains unchanged with this commit. 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/sunxvr500.c42
1 files changed, 7 insertions, 35 deletions
diff --git a/drivers/video/fbdev/sunxvr500.c b/drivers/video/fbdev/sunxvr500.c
index 387350d004df..dc0d886e4e7e 100644
--- a/drivers/video/fbdev/sunxvr500.c
+++ b/drivers/video/fbdev/sunxvr500.c
@@ -1,9 +1,10 @@
1/* sunxvr500.c: Sun 3DLABS XVR-500 Expert3D driver for sparc64 systems 1/* sunxvr500.c: Sun 3DLABS XVR-500 Expert3D 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>
@@ -392,25 +393,6 @@ err_out:
392 return err; 393 return err;
393} 394}
394 395
395static void e3d_pci_unregister(struct pci_dev *pdev)
396{
397 struct fb_info *info = pci_get_drvdata(pdev);
398 struct e3d_info *ep = info->par;
399
400 unregister_framebuffer(info);
401
402 iounmap(ep->ramdac);
403 iounmap(ep->fb_base);
404
405 pci_release_region(pdev, 0);
406 pci_release_region(pdev, 1);
407
408 fb_dealloc_cmap(&info->cmap);
409 framebuffer_release(info);
410
411 pci_disable_device(pdev);
412}
413
414static struct pci_device_id e3d_pci_table[] = { 396static struct pci_device_id e3d_pci_table[] = {
415 { PCI_DEVICE(PCI_VENDOR_ID_3DLABS, 0x7a0), }, 397 { PCI_DEVICE(PCI_VENDOR_ID_3DLABS, 0x7a0), },
416 { PCI_DEVICE(0x1091, 0x7a0), }, 398 { PCI_DEVICE(0x1091, 0x7a0), },
@@ -434,10 +416,12 @@ static struct pci_device_id e3d_pci_table[] = {
434}; 416};
435 417
436static struct pci_driver e3d_driver = { 418static struct pci_driver e3d_driver = {
419 .driver = {
420 .suppress_bind_attrs = true,
421 },
437 .name = "e3d", 422 .name = "e3d",
438 .id_table = e3d_pci_table, 423 .id_table = e3d_pci_table,
439 .probe = e3d_pci_register, 424 .probe = e3d_pci_register,
440 .remove = e3d_pci_unregister,
441}; 425};
442 426
443static int __init e3d_init(void) 427static int __init e3d_init(void)
@@ -447,16 +431,4 @@ static int __init e3d_init(void)
447 431
448 return pci_register_driver(&e3d_driver); 432 return pci_register_driver(&e3d_driver);
449} 433}
450 434device_initcall(e3d_init);
451static void __exit e3d_exit(void)
452{
453 pci_unregister_driver(&e3d_driver);
454}
455
456module_init(e3d_init);
457module_exit(e3d_exit);
458
459MODULE_DESCRIPTION("framebuffer driver for Sun XVR-500 graphics");
460MODULE_AUTHOR("David S. Miller <davem@davemloft.net>");
461MODULE_VERSION("1.0");
462MODULE_LICENSE("GPL");