diff options
author | Axel Lin <axel.lin@gmail.com> | 2012-04-03 03:59:44 +0200 |
---|---|---|
committer | David Woodhouse <David.Woodhouse@intel.com> | 2012-05-14 05:47:19 +0200 |
commit | 4d16cd658700a36af8788a09b4789d09da355a8c (patch) | |
tree | 2674d8ff91911be1b278fcadce616254e6bedf56 /drivers/mtd/maps/pci.c | |
parent | mtd: gpmi: do not include the mxs.h (diff) | |
download | linux-4d16cd658700a36af8788a09b4789d09da355a8c.tar.xz linux-4d16cd658700a36af8788a09b4789d09da355a8c.zip |
mtd: use module_pci_driver
This patch converts the drivers in drivers/mtd/* to use module_pci_driver()
macro which makes the code smaller and a bit simpler.
Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
Diffstat (limited to 'drivers/mtd/maps/pci.c')
-rw-r--r-- | drivers/mtd/maps/pci.c | 13 |
1 files changed, 1 insertions, 12 deletions
diff --git a/drivers/mtd/maps/pci.c b/drivers/mtd/maps/pci.c index 1d005a3e9b41..f14ce0af763f 100644 --- a/drivers/mtd/maps/pci.c +++ b/drivers/mtd/maps/pci.c @@ -352,18 +352,7 @@ static struct pci_driver mtd_pci_driver = { .id_table = mtd_pci_ids, }; -static int __init mtd_pci_maps_init(void) -{ - return pci_register_driver(&mtd_pci_driver); -} - -static void __exit mtd_pci_maps_exit(void) -{ - pci_unregister_driver(&mtd_pci_driver); -} - -module_init(mtd_pci_maps_init); -module_exit(mtd_pci_maps_exit); +module_pci_driver(mtd_pci_driver); MODULE_LICENSE("GPL"); MODULE_AUTHOR("Russell King <rmk@arm.linux.org.uk>"); |