Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1411187

[PATCH] can: tscan1: Utilize the module_isa_driver macro

From William Breathitt Gray <vilhelm.gray@gmail.com>
Newsgroups linux.kernel
Subject [PATCH] can: tscan1: Utilize the module_isa_driver macro
Date 2016-06-01 15:10 +0200
Message-ID <rFe4h-n9-1@gated-at.bofh.it> (permalink)
Organization linux.* mail to news gateway

Show all headers | View raw


This driver does not do anything special in module init/exit. This patch
eliminates the module init/exit boilerplate code by utilizing the
module_isa_driver macro.

Signed-off-by: William Breathitt Gray <vilhelm.gray@gmail.com>
---
 drivers/net/can/sja1000/tscan1.c | 12 +-----------
 1 file changed, 1 insertion(+), 11 deletions(-)

diff --git a/drivers/net/can/sja1000/tscan1.c b/drivers/net/can/sja1000/tscan1.c
index 76513dd..7957245 100644
--- a/drivers/net/can/sja1000/tscan1.c
+++ b/drivers/net/can/sja1000/tscan1.c
@@ -203,14 +203,4 @@ static struct isa_driver tscan1_isa_driver = {
 	},
 };
 
-static int __init tscan1_init(void)
-{
-	return isa_register_driver(&tscan1_isa_driver, TSCAN1_MAXDEV);
-}
-module_init(tscan1_init);
-
-static void __exit tscan1_exit(void)
-{
-	isa_unregister_driver(&tscan1_isa_driver);
-}
-module_exit(tscan1_exit);
+module_isa_driver(tscan1_isa_driver, TSCAN1_MAXDEV);
-- 
2.7.3

Back to linux.kernel | Previous | Next | Find similar | Unroll thread


Thread

[PATCH] can: tscan1: Utilize the module_isa_driver macro William Breathitt Gray <vilhelm.gray@gmail.com> - 2016-06-01 15:10 +0200

csiph-web