diff options
author | Axel Lin <axel.lin@gmail.com> | 2012-03-17 02:05:41 -0400 |
---|---|---|
committer | Dmitry Torokhov <dmitry.torokhov@gmail.com> | 2012-03-17 02:06:19 -0400 |
commit | 1b92c1cf6b638e7cbe9fdaac3f6efb8874f5cc02 (patch) | |
tree | 88e7cfcd088df7eba9b705285c8e0d8ba7bbd632 /drivers/input/misc/mpu3050.c | |
parent | ca83922e1c51c090e62bd42f3c12c84f49374a9e (diff) |
Input: convert I2C drivers to use module_i2c_driver()
This patch converts the drivers in drivers/input/* 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>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
Diffstat (limited to 'drivers/input/misc/mpu3050.c')
-rw-r--r-- | drivers/input/misc/mpu3050.c | 12 |
1 files changed, 1 insertions, 11 deletions
diff --git a/drivers/input/misc/mpu3050.c b/drivers/input/misc/mpu3050.c index 208d1a1cc7f3..5403c571b6a5 100644 --- a/drivers/input/misc/mpu3050.c +++ b/drivers/input/misc/mpu3050.c | |||
@@ -475,17 +475,7 @@ static struct i2c_driver mpu3050_i2c_driver = { | |||
475 | .id_table = mpu3050_ids, | 475 | .id_table = mpu3050_ids, |
476 | }; | 476 | }; |
477 | 477 | ||
478 | static int __init mpu3050_init(void) | 478 | module_i2c_driver(mpu3050_i2c_driver); |
479 | { | ||
480 | return i2c_add_driver(&mpu3050_i2c_driver); | ||
481 | } | ||
482 | module_init(mpu3050_init); | ||
483 | |||
484 | static void __exit mpu3050_exit(void) | ||
485 | { | ||
486 | i2c_del_driver(&mpu3050_i2c_driver); | ||
487 | } | ||
488 | module_exit(mpu3050_exit); | ||
489 | 479 | ||
490 | MODULE_AUTHOR("Wistron Corp."); | 480 | MODULE_AUTHOR("Wistron Corp."); |
491 | MODULE_DESCRIPTION("MPU3050 Tri-axis gyroscope driver"); | 481 | MODULE_DESCRIPTION("MPU3050 Tri-axis gyroscope driver"); |