Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

vme: make core vme support explicitly non-modular

The Kconfig currently controlling compilation of this code is:

drivers/vme/Kconfig:menuconfig VME_BUS
drivers/vme/Kconfig: bool "VME bridge 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 replace module.h and moduleparam.h (unused) with init.h and also
export.h ; the latter since this file does export some syms.

Since this is a struct bus_type and not a platform_driver, we don't
have any ".suppress_bind_attrs" to be concerned about when we
drop the ".remove" code from this file.

Since module_init was not in use by this code, the init ordering
remains unchanged with this commit.

Cc: Manohar Vanga <manohar.vanga@gmail.com>
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
Acked-by: Martyn Welch <martyn@welchs.me.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

authored by

Paul Gortmaker and committed by
Greg Kroah-Hartman
050c3d52 553ebb8e

+2 -25
+2 -25
drivers/vme/vme.c
··· 13 13 * option) any later version. 14 14 */ 15 15 16 - #include <linux/module.h> 17 - #include <linux/moduleparam.h> 16 + #include <linux/init.h> 17 + #include <linux/export.h> 18 18 #include <linux/mm.h> 19 19 #include <linux/types.h> 20 20 #include <linux/kernel.h> ··· 39 39 static LIST_HEAD(vme_bus_list); 40 40 static DEFINE_MUTEX(vme_buses_lock); 41 41 42 - static void __exit vme_exit(void); 43 42 static int __init vme_init(void); 44 43 45 44 static struct vme_dev *dev_to_vme_dev(struct device *dev) ··· 1621 1622 return retval; 1622 1623 } 1623 1624 1624 - static int vme_bus_remove(struct device *dev) 1625 - { 1626 - int retval = -ENODEV; 1627 - struct vme_driver *driver; 1628 - struct vme_dev *vdev = dev_to_vme_dev(dev); 1629 - 1630 - driver = dev->platform_data; 1631 - 1632 - if (driver->remove != NULL) 1633 - retval = driver->remove(vdev); 1634 - 1635 - return retval; 1636 - } 1637 - 1638 1625 struct bus_type vme_bus_type = { 1639 1626 .name = "vme", 1640 1627 .match = vme_bus_match, 1641 1628 .probe = vme_bus_probe, 1642 - .remove = vme_bus_remove, 1643 1629 }; 1644 1630 EXPORT_SYMBOL(vme_bus_type); 1645 1631 ··· 1632 1648 { 1633 1649 return bus_register(&vme_bus_type); 1634 1650 } 1635 - 1636 - static void __exit vme_exit(void) 1637 - { 1638 - bus_unregister(&vme_bus_type); 1639 - } 1640 - 1641 1651 subsys_initcall(vme_init); 1642 - module_exit(vme_exit);