summaryrefslogtreecommitdiffstats
path: root/drivers/i2c/busses
diff options
context:
space:
mode:
authorGuan Xuetao <gxt@mprc.pku.edu.cn>2011-12-26 16:59:34 +0800
committerGuan Xuetao <gxt@mprc.pku.edu.cn>2012-01-10 10:29:41 +0800
commit858af58f67d4aba8afb02438e74292b9273cdb10 (patch)
tree8dee8d44e5dae4621ed9e113052cee7868f114a6 /drivers/i2c/busses
parenta9196b0bd3284fa3388998c9208a708a8f2e4c83 (diff)
downloadlinux-858af58f67d4aba8afb02438e74292b9273cdb10.tar.gz
linux-858af58f67d4aba8afb02438e74292b9273cdb10.tar.bz2
linux-858af58f67d4aba8afb02438e74292b9273cdb10.zip
i2c-puv3: using module_platform_driver()
This patch converts the driver to use the module_platform_driver() macro which makes the code smaller and a bit simpler. Signed-off-by: Axel Lin <axel.lin@gmail.com> Signed-off-by: Guan Xuetao <gxt@mprc.pku.edu.cn>
Diffstat (limited to 'drivers/i2c/busses')
-rw-r--r--drivers/i2c/busses/i2c-puv3.c16
1 files changed, 2 insertions, 14 deletions
diff --git a/drivers/i2c/busses/i2c-puv3.c b/drivers/i2c/busses/i2c-puv3.c
index fac673940849..93709fbe30eb 100644
--- a/drivers/i2c/busses/i2c-puv3.c
+++ b/drivers/i2c/busses/i2c-puv3.c
@@ -276,8 +276,6 @@ static int puv3_i2c_resume(struct platform_device *dev)
#define puv3_i2c_resume NULL
#endif
-MODULE_ALIAS("platform:puv3_i2c");
-
static struct platform_driver puv3_i2c_driver = {
.probe = puv3_i2c_probe,
.remove = __devexit_p(puv3_i2c_remove),
@@ -289,18 +287,8 @@ static struct platform_driver puv3_i2c_driver = {
}
};
-static int __init puv3_i2c_init(void)
-{
- return platform_driver_register(&puv3_i2c_driver);
-}
-
-static void __exit puv3_i2c_exit(void)
-{
- platform_driver_unregister(&puv3_i2c_driver);
-}
-
-module_init(puv3_i2c_init);
-module_exit(puv3_i2c_exit);
+module_platform_driver(puv3_i2c_driver);
MODULE_DESCRIPTION("PKUnity v3 I2C driver");
MODULE_LICENSE("GPL v2");
+MODULE_ALIAS("platform:puv3_i2c");