aboutsummaryrefslogtreecommitdiff
path: root/drivers/spi/spi-dw-pci.c
diff options
context:
space:
mode:
authorAxel Lin <axel.lin@gmail.com>2012-04-04 22:29:32 +0800
committerGrant Likely <grant.likely@secretlab.ca>2012-04-10 14:11:34 -0600
commit8ebb35fd7ad07ab9a88a35eedd4f89a1e2a8fa55 (patch)
tree0da22d150c64ef9078fd2f36b32ab73556cf5dd0 /drivers/spi/spi-dw-pci.c
parent39f8052d2e0c35533e776ef1235e4cc32cc35d02 (diff)
spi: use module_pci_driver
This patch converts the drivers in drivers/spi/* 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: Grant Likely <grant.likely@secretlab.ca>
Diffstat (limited to 'drivers/spi/spi-dw-pci.c')
-rw-r--r--drivers/spi/spi-dw-pci.c13
1 files changed, 1 insertions, 12 deletions
diff --git a/drivers/spi/spi-dw-pci.c b/drivers/spi/spi-dw-pci.c
index 14f7cc9523f..ff81abbb306 100644
--- a/drivers/spi/spi-dw-pci.c
+++ b/drivers/spi/spi-dw-pci.c
@@ -164,18 +164,7 @@ static struct pci_driver dw_spi_driver = {
.resume = spi_resume,
};
-static int __init mrst_spi_init(void)
-{
- return pci_register_driver(&dw_spi_driver);
-}
-
-static void __exit mrst_spi_exit(void)
-{
- pci_unregister_driver(&dw_spi_driver);
-}
-
-module_init(mrst_spi_init);
-module_exit(mrst_spi_exit);
+module_pci_driver(dw_spi_driver);
MODULE_AUTHOR("Feng Tang <feng.tang@intel.com>");
MODULE_DESCRIPTION("PCI interface driver for DW SPI Core");