Commit a680b30a53668e299d487117ded7b76a069abc77
Committed by
David S. Miller
1 parent
7f83560df2
Exists in
smarc-l5.0.0_1.0.0-ga
and in
5 other branches
net/tokenring: use module_pci_driver
This patch converts the drivers in drivers/net/tokenring/* to use module_pci_driver() macro which makes the code smaller and a bit simpler. Signed-off-by: Axel Lin <axel.lin@gmail.com> Cc: "David S. Miller" <davem@davemloft.net> Cc: David Howells <dhowells@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Showing 4 changed files with 4 additions and 48 deletions Side-by-side Diff
drivers/net/tokenring/3c359.c
... | ... | @@ -1826,19 +1826,7 @@ |
1826 | 1826 | .remove = __devexit_p(xl_remove_one), |
1827 | 1827 | }; |
1828 | 1828 | |
1829 | -static int __init xl_pci_init (void) | |
1830 | -{ | |
1831 | - return pci_register_driver(&xl_3c359_driver); | |
1832 | -} | |
1833 | - | |
1834 | - | |
1835 | -static void __exit xl_pci_cleanup (void) | |
1836 | -{ | |
1837 | - pci_unregister_driver (&xl_3c359_driver); | |
1838 | -} | |
1839 | - | |
1840 | -module_init(xl_pci_init); | |
1841 | -module_exit(xl_pci_cleanup); | |
1829 | +module_pci_driver(xl_3c359_driver); | |
1842 | 1830 | |
1843 | 1831 | MODULE_LICENSE("GPL") ; |
drivers/net/tokenring/lanstreamer.c
... | ... | @@ -1904,15 +1904,7 @@ |
1904 | 1904 | .remove = __devexit_p(streamer_remove_one), |
1905 | 1905 | }; |
1906 | 1906 | |
1907 | -static int __init streamer_init_module(void) { | |
1908 | - return pci_register_driver(&streamer_pci_driver); | |
1909 | -} | |
1907 | +module_pci_driver(streamer_pci_driver); | |
1910 | 1908 | |
1911 | -static void __exit streamer_cleanup_module(void) { | |
1912 | - pci_unregister_driver(&streamer_pci_driver); | |
1913 | -} | |
1914 | - | |
1915 | -module_init(streamer_init_module); | |
1916 | -module_exit(streamer_cleanup_module); | |
1917 | 1909 | MODULE_LICENSE("GPL"); |
drivers/net/tokenring/olympic.c
... | ... | @@ -1732,19 +1732,7 @@ |
1732 | 1732 | .remove = __devexit_p(olympic_remove_one), |
1733 | 1733 | }; |
1734 | 1734 | |
1735 | -static int __init olympic_pci_init(void) | |
1736 | -{ | |
1737 | - return pci_register_driver(&olympic_driver) ; | |
1738 | -} | |
1739 | - | |
1740 | -static void __exit olympic_pci_cleanup(void) | |
1741 | -{ | |
1742 | - pci_unregister_driver(&olympic_driver) ; | |
1743 | -} | |
1744 | - | |
1745 | - | |
1746 | -module_init(olympic_pci_init) ; | |
1747 | -module_exit(olympic_pci_cleanup) ; | |
1735 | +module_pci_driver(olympic_driver); | |
1748 | 1736 | |
1749 | 1737 | MODULE_LICENSE("GPL"); |
drivers/net/tokenring/tmspci.c
... | ... | @@ -233,16 +233,5 @@ |
233 | 233 | .remove = __devexit_p(tms_pci_detach), |
234 | 234 | }; |
235 | 235 | |
236 | -static int __init tms_pci_init (void) | |
237 | -{ | |
238 | - return pci_register_driver(&tms_pci_driver); | |
239 | -} | |
240 | - | |
241 | -static void __exit tms_pci_rmmod (void) | |
242 | -{ | |
243 | - pci_unregister_driver (&tms_pci_driver); | |
244 | -} | |
245 | - | |
246 | -module_init(tms_pci_init); | |
247 | -module_exit(tms_pci_rmmod); | |
236 | +module_pci_driver(tms_pci_driver); |