summaryrefslogtreecommitdiffstats
path: root/drivers/i2c/busses/i2c-pca-platform.c
diff options
context:
space:
mode:
authorAxel Lin <axel.lin@gmail.com>2012-01-12 20:32:04 +0100
committerJean Delvare <khali@endymion.delvare>2012-01-12 20:32:04 +0100
commita3664b51c783aaa0dde1c95334d1a670d6d54590 (patch)
tree6b778b6f222800b761abcba0418a2b8d50718442 /drivers/i2c/busses/i2c-pca-platform.c
parenta699ed6f1f977dcc4a49452a247cf21dc9cec3f9 (diff)
downloadtalos-obmc-linux-a3664b51c783aaa0dde1c95334d1a670d6d54590.tar.gz
talos-obmc-linux-a3664b51c783aaa0dde1c95334d1a670d6d54590.zip
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>
Diffstat (limited to 'drivers/i2c/busses/i2c-pca-platform.c')
-rw-r--r--drivers/i2c/busses/i2c-pca-platform.c14
1 files changed, 1 insertions, 13 deletions
diff --git a/drivers/i2c/busses/i2c-pca-platform.c b/drivers/i2c/busses/i2c-pca-platform.c
index ace67995d7de..2adbf1a8fdea 100644
--- a/drivers/i2c/busses/i2c-pca-platform.c
+++ b/drivers/i2c/busses/i2c-pca-platform.c
@@ -286,20 +286,8 @@ static struct platform_driver i2c_pca_pf_driver = {
},
};
-static int __init i2c_pca_pf_init(void)
-{
- return platform_driver_register(&i2c_pca_pf_driver);
-}
-
-static void __exit i2c_pca_pf_exit(void)
-{
- platform_driver_unregister(&i2c_pca_pf_driver);
-}
+module_platform_driver(i2c_pca_pf_driver);
MODULE_AUTHOR("Wolfram Sang <w.sang@pengutronix.de>");
MODULE_DESCRIPTION("I2C-PCA9564/PCA9665 platform driver");
MODULE_LICENSE("GPL");
-
-module_init(i2c_pca_pf_init);
-module_exit(i2c_pca_pf_exit);
-
OpenPOWER on IntegriCloud