i2c/busses: Use module_platform_driver()
Convert the drivers in drivers/i2c/busses/* to use the module_platform_driver() macro which makes the code smaller and a bit simpler. Cc: Ben Dooks <ben-linux@fluff.org> Acked-by: Jochen Friedrich <jochen@scram.de> Acked-by: Peter Korsgaard <jacmet@sunsite.dk> Acked-by: Wolfram Sang <w.sang@pengutronix.de> Cc: Manuel Lauss <manuel.lauss@googlemail.com> Cc: Barry Song <21cnbao@gmail.com> Cc: Linus Walleij <linus.walleij@linaro.org> Cc: Yong Zhang <yong.zhang0@gmail.com> Cc: Lucas De Marchi <lucas.demarchi@profusion.mobi> Cc: Grant Likely <grant.likely@secretlab.ca> Cc: Samuel Ortiz <sameo@linux.intel.com> Signed-off-by: Axel Lin <axel.lin@gmail.com> Signed-off-by: Jean Delvare <khali@linux-fr.org>
This commit is contained in:
@@ -312,10 +312,6 @@ static int __devinit i2c_powermac_probe(struct platform_device *dev)
|
||||
return rc;
|
||||
}
|
||||
|
||||
|
||||
/* work with hotplug and coldplug */
|
||||
MODULE_ALIAS("platform:i2c-powermac");
|
||||
|
||||
static struct platform_driver i2c_powermac_driver = {
|
||||
.probe = i2c_powermac_probe,
|
||||
.remove = __devexit_p(i2c_powermac_remove),
|
||||
@@ -325,17 +321,6 @@ static struct platform_driver i2c_powermac_driver = {
|
||||
},
|
||||
};
|
||||
|
||||
static int __init i2c_powermac_init(void)
|
||||
{
|
||||
platform_driver_register(&i2c_powermac_driver);
|
||||
return 0;
|
||||
}
|
||||
module_platform_driver(i2c_powermac_driver);
|
||||
|
||||
|
||||
static void __exit i2c_powermac_cleanup(void)
|
||||
{
|
||||
platform_driver_unregister(&i2c_powermac_driver);
|
||||
}
|
||||
|
||||
module_init(i2c_powermac_init);
|
||||
module_exit(i2c_powermac_cleanup);
|
||||
MODULE_ALIAS("platform:i2c-powermac");
|
||||
|
Reference in New Issue
Block a user