aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/vme
diff options
context:
space:
mode:
authorWei Yongjun <yongjun_wei@trendmicro.com.cn>2012-10-18 11:13:37 -0400
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2012-10-25 15:02:10 -0400
commitc7b50a2a29451f9a6ec6bc7fd4c8ad836297ffc4 (patch)
tree9536ec5193b1b1f278270c9daaa391253c930299 /drivers/vme
parent5f1e7790963f03c5789070b3954f38d038ad528b (diff)
vme: vme_ca91cx42.c: use module_pci_driver to simplify the code
Use the module_pci_driver() macro to make the code simpler by eliminating module_init and module_exit calls. dpatch engine is used to auto generate this patch. (https://github.com/weiyj/dpatch) Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/vme')
-rw-r--r--drivers/vme/bridges/vme_ca91cx42.c15
1 files changed, 1 insertions, 14 deletions
diff --git a/drivers/vme/bridges/vme_ca91cx42.c b/drivers/vme/bridges/vme_ca91cx42.c
index 1425d22cf956..64bfea314429 100644
--- a/drivers/vme/bridges/vme_ca91cx42.c
+++ b/drivers/vme/bridges/vme_ca91cx42.c
@@ -34,10 +34,8 @@
34#include "../vme_bridge.h" 34#include "../vme_bridge.h"
35#include "vme_ca91cx42.h" 35#include "vme_ca91cx42.h"
36 36
37static int __init ca91cx42_init(void);
38static int ca91cx42_probe(struct pci_dev *, const struct pci_device_id *); 37static int ca91cx42_probe(struct pci_dev *, const struct pci_device_id *);
39static void ca91cx42_remove(struct pci_dev *); 38static void ca91cx42_remove(struct pci_dev *);
40static void __exit ca91cx42_exit(void);
41 39
42/* Module parameters */ 40/* Module parameters */
43static int geoid; 41static int geoid;
@@ -1523,11 +1521,6 @@ static void ca91cx42_free_consistent(struct device *parent, size_t size,
1523 pci_free_consistent(pdev, size, vaddr, dma); 1521 pci_free_consistent(pdev, size, vaddr, dma);
1524} 1522}
1525 1523
1526static int __init ca91cx42_init(void)
1527{
1528 return pci_register_driver(&ca91cx42_driver);
1529}
1530
1531/* 1524/*
1532 * Configure CR/CSR space 1525 * Configure CR/CSR space
1533 * 1526 *
@@ -1944,16 +1937,10 @@ static void ca91cx42_remove(struct pci_dev *pdev)
1944 kfree(ca91cx42_bridge); 1937 kfree(ca91cx42_bridge);
1945} 1938}
1946 1939
1947static void __exit ca91cx42_exit(void) 1940module_pci_driver(ca91cx42_driver);
1948{
1949 pci_unregister_driver(&ca91cx42_driver);
1950}
1951 1941
1952MODULE_PARM_DESC(geoid, "Override geographical addressing"); 1942MODULE_PARM_DESC(geoid, "Override geographical addressing");
1953module_param(geoid, int, 0); 1943module_param(geoid, int, 0);
1954 1944
1955MODULE_DESCRIPTION("VME driver for the Tundra Universe II VME bridge"); 1945MODULE_DESCRIPTION("VME driver for the Tundra Universe II VME bridge");
1956MODULE_LICENSE("GPL"); 1946MODULE_LICENSE("GPL");
1957
1958module_init(ca91cx42_init);
1959module_exit(ca91cx42_exit);