diff options
author | Axel Lin <axel.lin@gmail.com> | 2012-03-26 15:47:19 -0400 |
---|---|---|
committer | Jean Delvare <khali@endymion.delvare> | 2012-03-26 15:47:19 -0400 |
commit | de05497aab22b515ff02988634eab59848410a25 (patch) | |
tree | 5417156ec4bbf2b5d459202484a087aac6d303a0 /drivers/i2c/muxes | |
parent | 84c1af4c21d645a02a4780cdf61c7551d8e7bb56 (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')
-rw-r--r-- | drivers/i2c/muxes/pca9541.c | 13 | ||||
-rw-r--r-- | drivers/i2c/muxes/pca954x.c | 13 |
2 files changed, 2 insertions, 24 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 = { | |||
393 | .id_table = pca9541_id, | 393 | .id_table = pca9541_id, |
394 | }; | 394 | }; |
395 | 395 | ||
396 | static int __init pca9541_init(void) | 396 | module_i2c_driver(pca9541_driver); |
397 | { | ||
398 | return i2c_add_driver(&pca9541_driver); | ||
399 | } | ||
400 | |||
401 | static void __exit pca9541_exit(void) | ||
402 | { | ||
403 | i2c_del_driver(&pca9541_driver); | ||
404 | } | ||
405 | |||
406 | module_init(pca9541_init); | ||
407 | module_exit(pca9541_exit); | ||
408 | 397 | ||
409 | MODULE_AUTHOR("Guenter Roeck <guenter.roeck@ericsson.com>"); | 398 | MODULE_AUTHOR("Guenter Roeck <guenter.roeck@ericsson.com>"); |
410 | MODULE_DESCRIPTION("PCA9541 I2C master selector driver"); | 399 | MODULE_DESCRIPTION("PCA9541 I2C master selector driver"); |
diff --git a/drivers/i2c/muxes/pca954x.c b/drivers/i2c/muxes/pca954x.c index 6f8953664636..0e37ef27aa12 100644 --- a/drivers/i2c/muxes/pca954x.c +++ b/drivers/i2c/muxes/pca954x.c | |||
@@ -284,18 +284,7 @@ static struct i2c_driver pca954x_driver = { | |||
284 | .id_table = pca954x_id, | 284 | .id_table = pca954x_id, |
285 | }; | 285 | }; |
286 | 286 | ||
287 | static int __init pca954x_init(void) | 287 | module_i2c_driver(pca954x_driver); |
288 | { | ||
289 | return i2c_add_driver(&pca954x_driver); | ||
290 | } | ||
291 | |||
292 | static void __exit pca954x_exit(void) | ||
293 | { | ||
294 | i2c_del_driver(&pca954x_driver); | ||
295 | } | ||
296 | |||
297 | module_init(pca954x_init); | ||
298 | module_exit(pca954x_exit); | ||
299 | 288 | ||
300 | MODULE_AUTHOR("Rodolfo Giometti <giometti@linux.it>"); | 289 | MODULE_AUTHOR("Rodolfo Giometti <giometti@linux.it>"); |
301 | MODULE_DESCRIPTION("PCA954x I2C mux/switch driver"); | 290 | MODULE_DESCRIPTION("PCA954x I2C mux/switch driver"); |