summaryrefslogtreecommitdiff
path: root/drivers/uio
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/uio')
-rw-r--r--drivers/uio/uio_aec.c14
-rw-r--r--drivers/uio/uio_cif.c14
-rw-r--r--drivers/uio/uio_netx.c14
-rw-r--r--drivers/uio/uio_pci_generic.c17
-rw-r--r--drivers/uio/uio_sercos3.c14
5 files changed, 6 insertions, 67 deletions
diff --git a/drivers/uio/uio_aec.c b/drivers/uio/uio_aec.c
index 1548982db58b..f3611c2d83b6 100644
--- a/drivers/uio/uio_aec.c
+++ b/drivers/uio/uio_aec.c
@@ -160,17 +160,5 @@ static struct pci_driver pci_driver = {
.remove = remove,
};
-static int __init aectc_init(void)
-{
- return pci_register_driver(&pci_driver);
-}
-
-static void __exit aectc_exit(void)
-{
- pci_unregister_driver(&pci_driver);
-}
-
+module_pci_driver(pci_driver);
MODULE_LICENSE("GPL");
-
-module_init(aectc_init);
-module_exit(aectc_exit);
diff --git a/drivers/uio/uio_cif.c b/drivers/uio/uio_cif.c
index 7dd6fc60539d..22cdf385ab33 100644
--- a/drivers/uio/uio_cif.c
+++ b/drivers/uio/uio_cif.c
@@ -135,19 +135,7 @@ static struct pci_driver hilscher_pci_driver = {
.remove = hilscher_pci_remove,
};
-static int __init hilscher_init_module(void)
-{
- return pci_register_driver(&hilscher_pci_driver);
-}
-
-static void __exit hilscher_exit_module(void)
-{
- pci_unregister_driver(&hilscher_pci_driver);
-}
-
-module_init(hilscher_init_module);
-module_exit(hilscher_exit_module);
-
+module_pci_driver(hilscher_pci_driver);
MODULE_DEVICE_TABLE(pci, hilscher_pci_ids);
MODULE_LICENSE("GPL v2");
MODULE_AUTHOR("Hans J. Koch, Benedikt Spranger");
diff --git a/drivers/uio/uio_netx.c b/drivers/uio/uio_netx.c
index 6a4ba5e83e37..28a766b9e198 100644
--- a/drivers/uio/uio_netx.c
+++ b/drivers/uio/uio_netx.c
@@ -174,19 +174,7 @@ static struct pci_driver netx_pci_driver = {
.remove = netx_pci_remove,
};
-static int __init netx_init_module(void)
-{
- return pci_register_driver(&netx_pci_driver);
-}
-
-static void __exit netx_exit_module(void)
-{
- pci_unregister_driver(&netx_pci_driver);
-}
-
-module_init(netx_init_module);
-module_exit(netx_exit_module);
-
+module_pci_driver(netx_pci_driver);
MODULE_DEVICE_TABLE(pci, netx_pci_ids);
MODULE_LICENSE("GPL v2");
MODULE_AUTHOR("Hans J. Koch, Manuel Traut");
diff --git a/drivers/uio/uio_pci_generic.c b/drivers/uio/uio_pci_generic.c
index 14aa10c1f6de..077ae12269ce 100644
--- a/drivers/uio/uio_pci_generic.c
+++ b/drivers/uio/uio_pci_generic.c
@@ -113,27 +113,14 @@ static void remove(struct pci_dev *pdev)
kfree(gdev);
}
-static struct pci_driver driver = {
+static struct pci_driver uio_pci_driver = {
.name = "uio_pci_generic",
.id_table = NULL, /* only dynamic id's */
.probe = probe,
.remove = remove,
};
-static int __init init(void)
-{
- pr_info(DRIVER_DESC " version: " DRIVER_VERSION "\n");
- return pci_register_driver(&driver);
-}
-
-static void __exit cleanup(void)
-{
- pci_unregister_driver(&driver);
-}
-
-module_init(init);
-module_exit(cleanup);
-
+module_pci_driver(uio_pci_driver);
MODULE_VERSION(DRIVER_VERSION);
MODULE_LICENSE("GPL v2");
MODULE_AUTHOR(DRIVER_AUTHOR);
diff --git a/drivers/uio/uio_sercos3.c b/drivers/uio/uio_sercos3.c
index 81a10a563120..541983217085 100644
--- a/drivers/uio/uio_sercos3.c
+++ b/drivers/uio/uio_sercos3.c
@@ -226,19 +226,7 @@ static struct pci_driver sercos3_pci_driver = {
.remove = sercos3_pci_remove,
};
-static int __init sercos3_init_module(void)
-{
- return pci_register_driver(&sercos3_pci_driver);
-}
-
-static void __exit sercos3_exit_module(void)
-{
- pci_unregister_driver(&sercos3_pci_driver);
-}
-
-module_init(sercos3_init_module);
-module_exit(sercos3_exit_module);
-
+module_pci_driver(sercos3_pci_driver);
MODULE_DESCRIPTION("UIO driver for the Automata Sercos III PCI card");
MODULE_AUTHOR("John Ogness <john.ogness@linutronix.de>");
MODULE_LICENSE("GPL v2");