diff options
author | Wei Yongjun <yongjun_wei@trendmicro.com.cn> | 2012-10-08 10:06:07 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2012-10-24 18:52:29 -0400 |
commit | dbfd5ccc057fbefb7247614741efbf96be0258c5 (patch) | |
tree | 47b73c0fdb97794b73d84a1651cc4fc5d72122b8 /drivers/w1 | |
parent | 35299f884aa301deefb0881096e6d88d0964c94b (diff) |
w1/ds2482: use module_i2c_driver to simplify the code
Use the module_i2c_driver() macro to make the code smaller
and a bit simpler.
dpatch engine is used to auto generate this patch.
(https://github.com/weiyj/dpatch)
Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
Acked-by: Evgeniy Polyakov <zbr@ioremap.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/w1')
-rw-r--r-- | drivers/w1/masters/ds2482.c | 13 |
1 files changed, 1 insertions, 12 deletions
diff --git a/drivers/w1/masters/ds2482.c b/drivers/w1/masters/ds2482.c index e5f74416d4b7..6429b9e9fb82 100644 --- a/drivers/w1/masters/ds2482.c +++ b/drivers/w1/masters/ds2482.c | |||
@@ -505,19 +505,8 @@ static int ds2482_remove(struct i2c_client *client) | |||
505 | return 0; | 505 | return 0; |
506 | } | 506 | } |
507 | 507 | ||
508 | static int __init sensors_ds2482_init(void) | 508 | module_i2c_driver(ds2482_driver); |
509 | { | ||
510 | return i2c_add_driver(&ds2482_driver); | ||
511 | } | ||
512 | |||
513 | static void __exit sensors_ds2482_exit(void) | ||
514 | { | ||
515 | i2c_del_driver(&ds2482_driver); | ||
516 | } | ||
517 | 509 | ||
518 | MODULE_AUTHOR("Ben Gardner <bgardner@wabtec.com>"); | 510 | MODULE_AUTHOR("Ben Gardner <bgardner@wabtec.com>"); |
519 | MODULE_DESCRIPTION("DS2482 driver"); | 511 | MODULE_DESCRIPTION("DS2482 driver"); |
520 | MODULE_LICENSE("GPL"); | 512 | MODULE_LICENSE("GPL"); |
521 | |||
522 | module_init(sensors_ds2482_init); | ||
523 | module_exit(sensors_ds2482_exit); | ||