Commit 8ebb35fd authored by Axel Lin's avatar Axel Lin Committed by Grant Likely

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: default avatarAxel Lin <axel.lin@gmail.com>
Signed-off-by: default avatarGrant Likely <grant.likely@secretlab.ca>
parent 39f8052d
...@@ -164,18 +164,7 @@ static struct pci_driver dw_spi_driver = { ...@@ -164,18 +164,7 @@ static struct pci_driver dw_spi_driver = {
.resume = spi_resume, .resume = spi_resume,
}; };
static int __init mrst_spi_init(void) module_pci_driver(dw_spi_driver);
{
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_AUTHOR("Feng Tang <feng.tang@intel.com>"); MODULE_AUTHOR("Feng Tang <feng.tang@intel.com>");
MODULE_DESCRIPTION("PCI interface driver for DW SPI Core"); MODULE_DESCRIPTION("PCI interface driver for DW SPI Core");
......
...@@ -164,17 +164,7 @@ static struct pci_driver ce4100_spi_driver = { ...@@ -164,17 +164,7 @@ static struct pci_driver ce4100_spi_driver = {
.remove = __devexit_p(ce4100_spi_remove), .remove = __devexit_p(ce4100_spi_remove),
}; };
static int __init ce4100_spi_init(void) module_pci_driver(ce4100_spi_driver);
{
return pci_register_driver(&ce4100_spi_driver);
}
module_init(ce4100_spi_init);
static void __exit ce4100_spi_exit(void)
{
pci_unregister_driver(&ce4100_spi_driver);
}
module_exit(ce4100_spi_exit);
MODULE_DESCRIPTION("CE4100 PCI-SPI glue code for PXA's driver"); MODULE_DESCRIPTION("CE4100 PCI-SPI glue code for PXA's driver");
MODULE_LICENSE("GPL v2"); MODULE_LICENSE("GPL v2");
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment