public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [char-misc-next] tifm: use module_pci_driver
@ 2012-08-26  9:02 Devendra Naga
  0 siblings, 0 replies; only message in thread
From: Devendra Naga @ 2012-08-26  9:02 UTC (permalink / raw)
  To: Alex Dubov, Arnd Bergmann, Greg Kroah-Hartman, linux-kernel; +Cc: Devendra Naga

tifm_7xx1_init and tifm_7xx1_exit with module_init and module_exit calls
can be replaced with the module_pci_driver call, as they are similar
to what module_pci_driver does

Signed-off-by: Devendra Naga <devendra.aaru@gmail.com>
---
 drivers/misc/tifm_7xx1.c |   14 +-------------
 1 file changed, 1 insertion(+), 13 deletions(-)

diff --git a/drivers/misc/tifm_7xx1.c b/drivers/misc/tifm_7xx1.c
index ba24790..f8d66543 100644
--- a/drivers/misc/tifm_7xx1.c
+++ b/drivers/misc/tifm_7xx1.c
@@ -434,21 +434,9 @@ static struct pci_driver tifm_7xx1_driver = {
 	.resume = tifm_7xx1_resume,
 };
 
-static int __init tifm_7xx1_init(void)
-{
-	return pci_register_driver(&tifm_7xx1_driver);
-}
-
-static void __exit tifm_7xx1_exit(void)
-{
-	pci_unregister_driver(&tifm_7xx1_driver);
-}
-
+module_pci_driver(tifm_7xx1_driver);
 MODULE_AUTHOR("Alex Dubov");
 MODULE_DESCRIPTION("TI FlashMedia host driver");
 MODULE_LICENSE("GPL");
 MODULE_DEVICE_TABLE(pci, tifm_7xx1_pci_tbl);
 MODULE_VERSION(DRIVER_VERSION);
-
-module_init(tifm_7xx1_init);
-module_exit(tifm_7xx1_exit);
-- 
1.7.9.5


^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2012-08-26  9:02 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-08-26  9:02 [char-misc-next] tifm: use module_pci_driver Devendra Naga

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox