summaryrefslogtreecommitdiff
path: root/drivers/i2c/muxes/pca9541.c
diff options
context:
space:
mode:
authorAxel Lin <axel.lin@gmail.com>2012-03-26 21:47:19 +0200
committerJean Delvare <khali@endymion.delvare>2012-03-26 21:47:19 +0200
commitde05497aab22b515ff02988634eab59848410a25 (patch)
tree5417156ec4bbf2b5d459202484a087aac6d303a0 /drivers/i2c/muxes/pca9541.c
parent84c1af4c21d645a02a4780cdf61c7551d8e7bb56 (diff)
i2c: Convert drivers/i2c/muxes/* to use module_i2c_driver()
This patch converts the drivers in drivers/i2c/muxes/* to use the module_i2c_driver() macro which makes the code smaller and a bit simpler. Signed-off-by: Axel Lin <axel.lin@gmail.com> Acked-by: Wolfram Sang <w.sang@pengutronix.de> Cc: Guenter Roeck <guenter.roeck@ericsson.com> Cc: Michael Lawnick <ml.lawnick@gmx.de> Cc: Ben Dooks <ben-linux@fluff.org> Signed-off-by: Jean Delvare <khali@linux-fr.org>
Diffstat (limited to 'drivers/i2c/muxes/pca9541.c')
-rw-r--r--drivers/i2c/muxes/pca9541.c13
1 files changed, 1 insertions, 12 deletions
diff --git a/drivers/i2c/muxes/pca9541.c b/drivers/i2c/muxes/pca9541.c
index ed699c5aa79d..e0df9b6c66b3 100644
--- a/drivers/i2c/muxes/pca9541.c
+++ b/drivers/i2c/muxes/pca9541.c
@@ -393,18 +393,7 @@ static struct i2c_driver pca9541_driver = {
.id_table = pca9541_id,
};
-static int __init pca9541_init(void)
-{
- return i2c_add_driver(&pca9541_driver);
-}
-
-static void __exit pca9541_exit(void)
-{
- i2c_del_driver(&pca9541_driver);
-}
-
-module_init(pca9541_init);
-module_exit(pca9541_exit);
+module_i2c_driver(pca9541_driver);
MODULE_AUTHOR("Guenter Roeck <guenter.roeck@ericsson.com>");
MODULE_DESCRIPTION("PCA9541 I2C master selector driver");