Commit 36efc94b1d09e75fc18b400b0fba8220f967fb44
Committed by
David S. Miller
1 parent
a334b5fb19
Exists in
smarc-l5.0.0_1.0.0-ga
and in
5 other branches
r6040: use module_pci_driver macro
as the manual of module_pci_driver says that it can be used when the init and exit functions of the module does nothing but the pci_register_driver and pci_unregister_driver. use it for rdc's r6040 driver, as the init and exit paths does as above, and also this reduces a little amount of code. Signed-off-by: Devendra Naga <devendra.aaru@gmail.com> Acked-by: Florian Fainelli <florian@openwrt.org> Signed-off-by: David S. Miller <davem@davemloft.net>
Showing 1 changed file with 1 additions and 14 deletions Side-by-side Diff
drivers/net/ethernet/rdc/r6040.c
... | ... | @@ -1277,18 +1277,5 @@ |
1277 | 1277 | .remove = __devexit_p(r6040_remove_one), |
1278 | 1278 | }; |
1279 | 1279 | |
1280 | - | |
1281 | -static int __init r6040_init(void) | |
1282 | -{ | |
1283 | - return pci_register_driver(&r6040_driver); | |
1284 | -} | |
1285 | - | |
1286 | - | |
1287 | -static void __exit r6040_cleanup(void) | |
1288 | -{ | |
1289 | - pci_unregister_driver(&r6040_driver); | |
1290 | -} | |
1291 | - | |
1292 | -module_init(r6040_init); | |
1293 | -module_exit(r6040_cleanup); | |
1280 | +module_pci_driver(r6040_driver); |