diff options
author | Paul Gortmaker <paul.gortmaker@windriver.com> | 2016-07-03 14:05:56 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2016-08-31 07:20:16 -0400 |
commit | 050c3d52cc7810d9d17b8cd231708609af6876ae (patch) | |
tree | 45ba9e91dac1535de76f95f09ae7e257ac0eaf71 /drivers/vme | |
parent | 553ebb8e40d5a9135be036cc6ebfdf40bdc1f710 (diff) |
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>
Diffstat (limited to 'drivers/vme')
-rw-r--r-- | drivers/vme/vme.c | 27 |
1 files changed, 2 insertions, 25 deletions
diff --git a/drivers/vme/vme.c b/drivers/vme/vme.c index 4693b7bd3364..15b64076bc26 100644 --- a/drivers/vme/vme.c +++ b/drivers/vme/vme.c | |||
@@ -13,8 +13,8 @@ | |||
13 | * option) any later version. | 13 | * option) any later version. |
14 | */ | 14 | */ |
15 | 15 | ||
16 | #include <linux/module.h> | 16 | #include <linux/init.h> |
17 | #include <linux/moduleparam.h> | 17 | #include <linux/export.h> |
18 | #include <linux/mm.h> | 18 | #include <linux/mm.h> |
19 | #include <linux/types.h> | 19 | #include <linux/types.h> |
20 | #include <linux/kernel.h> | 20 | #include <linux/kernel.h> |
@@ -39,7 +39,6 @@ static unsigned int vme_bus_numbers; | |||
39 | static LIST_HEAD(vme_bus_list); | 39 | static LIST_HEAD(vme_bus_list); |
40 | static DEFINE_MUTEX(vme_buses_lock); | 40 | static DEFINE_MUTEX(vme_buses_lock); |
41 | 41 | ||
42 | static void __exit vme_exit(void); | ||
43 | static int __init vme_init(void); | 42 | static int __init vme_init(void); |
44 | 43 | ||
45 | static struct vme_dev *dev_to_vme_dev(struct device *dev) | 44 | static struct vme_dev *dev_to_vme_dev(struct device *dev) |
@@ -1622,25 +1621,10 @@ static int vme_bus_probe(struct device *dev) | |||
1622 | return retval; | 1621 | return retval; |
1623 | } | 1622 | } |
1624 | 1623 | ||
1625 | static int vme_bus_remove(struct device *dev) | ||
1626 | { | ||
1627 | int retval = -ENODEV; | ||
1628 | struct vme_driver *driver; | ||
1629 | struct vme_dev *vdev = dev_to_vme_dev(dev); | ||
1630 | |||
1631 | driver = dev->platform_data; | ||
1632 | |||
1633 | if (driver->remove != NULL) | ||
1634 | retval = driver->remove(vdev); | ||
1635 | |||
1636 | return retval; | ||
1637 | } | ||
1638 | |||
1639 | struct bus_type vme_bus_type = { | 1624 | struct bus_type vme_bus_type = { |
1640 | .name = "vme", | 1625 | .name = "vme", |
1641 | .match = vme_bus_match, | 1626 | .match = vme_bus_match, |
1642 | .probe = vme_bus_probe, | 1627 | .probe = vme_bus_probe, |
1643 | .remove = vme_bus_remove, | ||
1644 | }; | 1628 | }; |
1645 | EXPORT_SYMBOL(vme_bus_type); | 1629 | EXPORT_SYMBOL(vme_bus_type); |
1646 | 1630 | ||
@@ -1648,11 +1632,4 @@ static int __init vme_init(void) | |||
1648 | { | 1632 | { |
1649 | return bus_register(&vme_bus_type); | 1633 | return bus_register(&vme_bus_type); |
1650 | } | 1634 | } |
1651 | |||
1652 | static void __exit vme_exit(void) | ||
1653 | { | ||
1654 | bus_unregister(&vme_bus_type); | ||
1655 | } | ||
1656 | |||
1657 | subsys_initcall(vme_init); | 1635 | subsys_initcall(vme_init); |
1658 | module_exit(vme_exit); | ||