Skip to content

Commit

Permalink
mfd: Use module_pci_driver
Browse files Browse the repository at this point in the history
This patch converts the drivers in drivers/mfd/* 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: Andres Salomon <dilinger@queued.net>
Cc: Ira W. Snyder <iws@ovro.caltech.edu>
Cc: Florian Fainelli <florian@openwrt.org>
Cc: Denis Turischev <denis@compulab.co.il>
Cc: Harald Welte <HaraldWelte@viatech.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
  • Loading branch information
AxelLin authored and Samuel Ortiz committed May 1, 2012
1 parent 6ed9f9c commit 38a36f5
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 63 deletions.
13 changes: 1 addition & 12 deletions drivers/mfd/cs5535-mfd.c
Original file line number Diff line number Diff line change
Expand Up @@ -186,18 +186,7 @@ static struct pci_driver cs5535_mfd_driver = {
.remove = __devexit_p(cs5535_mfd_remove),
};

static int __init cs5535_mfd_init(void)
{
return pci_register_driver(&cs5535_mfd_driver);
}

static void __exit cs5535_mfd_exit(void)
{
pci_unregister_driver(&cs5535_mfd_driver);
}

module_init(cs5535_mfd_init);
module_exit(cs5535_mfd_exit);
module_pci_driver(cs5535_mfd_driver);

MODULE_AUTHOR("Andres Salomon <dilinger@queued.net>");
MODULE_DESCRIPTION("MFD driver for CS5535/CS5536 southbridge's ISA PCI device");
Expand Down
17 changes: 1 addition & 16 deletions drivers/mfd/janz-cmodio.c
Original file line number Diff line number Diff line change
Expand Up @@ -283,23 +283,8 @@ static struct pci_driver cmodio_pci_driver = {
.remove = __devexit_p(cmodio_pci_remove),
};

/*
* Module Init / Exit
*/

static int __init cmodio_init(void)
{
return pci_register_driver(&cmodio_pci_driver);
}

static void __exit cmodio_exit(void)
{
pci_unregister_driver(&cmodio_pci_driver);
}
module_pci_driver(cmodio_pci_driver);

MODULE_AUTHOR("Ira W. Snyder <iws@ovro.caltech.edu>");
MODULE_DESCRIPTION("Janz CMOD-IO PCI MODULbus Carrier Board Driver");
MODULE_LICENSE("GPL");

module_init(cmodio_init);
module_exit(cmodio_exit);
13 changes: 1 addition & 12 deletions drivers/mfd/lpc_sch.c
Original file line number Diff line number Diff line change
Expand Up @@ -167,18 +167,7 @@ static struct pci_driver lpc_sch_driver = {
.remove = __devexit_p(lpc_sch_remove),
};

static int __init lpc_sch_init(void)
{
return pci_register_driver(&lpc_sch_driver);
}

static void __exit lpc_sch_exit(void)
{
pci_unregister_driver(&lpc_sch_driver);
}

module_init(lpc_sch_init);
module_exit(lpc_sch_exit);
module_pci_driver(lpc_sch_driver);

MODULE_AUTHOR("Denis Turischev <denis@compulab.co.il>");
MODULE_DESCRIPTION("LPC interface for Intel Poulsbo SCH");
Expand Down
13 changes: 1 addition & 12 deletions drivers/mfd/rdc321x-southbridge.c
Original file line number Diff line number Diff line change
Expand Up @@ -108,18 +108,7 @@ static struct pci_driver rdc321x_sb_driver = {
.remove = __devexit_p(rdc321x_sb_remove),
};

static int __init rdc321x_sb_init(void)
{
return pci_register_driver(&rdc321x_sb_driver);
}

static void __exit rdc321x_sb_exit(void)
{
pci_unregister_driver(&rdc321x_sb_driver);
}

module_init(rdc321x_sb_init);
module_exit(rdc321x_sb_exit);
module_pci_driver(rdc321x_sb_driver);

MODULE_AUTHOR("Florian Fainelli <florian@openwrt.org>");
MODULE_LICENSE("GPL");
Expand Down
12 changes: 1 addition & 11 deletions drivers/mfd/vx855.c
Original file line number Diff line number Diff line change
Expand Up @@ -131,17 +131,7 @@ static struct pci_driver vx855_pci_driver = {
.remove = __devexit_p(vx855_remove),
};

static int vx855_init(void)
{
return pci_register_driver(&vx855_pci_driver);
}
module_init(vx855_init);

static void vx855_exit(void)
{
pci_unregister_driver(&vx855_pci_driver);
}
module_exit(vx855_exit);
module_pci_driver(vx855_pci_driver);

MODULE_LICENSE("GPL");
MODULE_AUTHOR("Harald Welte <HaraldWelte@viatech.com>");
Expand Down

0 comments on commit 38a36f5

Please sign in to comment.