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/pcf8574_keypad.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/pcf8574_keypad.c')
-rw-r--r-- | drivers/input/misc/pcf8574_keypad.c | 12 |
1 files changed, 1 insertions, 11 deletions
diff --git a/drivers/input/misc/pcf8574_keypad.c b/drivers/input/misc/pcf8574_keypad.c index 08be1a355956..544c6635abe9 100644 --- a/drivers/input/misc/pcf8574_keypad.c +++ b/drivers/input/misc/pcf8574_keypad.c | |||
@@ -216,17 +216,7 @@ static struct i2c_driver pcf8574_kp_driver = { | |||
216 | .id_table = pcf8574_kp_id, | 216 | .id_table = pcf8574_kp_id, |
217 | }; | 217 | }; |
218 | 218 | ||
219 | static int __init pcf8574_kp_init(void) | 219 | module_i2c_driver(pcf8574_kp_driver); |
220 | { | ||
221 | return i2c_add_driver(&pcf8574_kp_driver); | ||
222 | } | ||
223 | module_init(pcf8574_kp_init); | ||
224 | |||
225 | static void __exit pcf8574_kp_exit(void) | ||
226 | { | ||
227 | i2c_del_driver(&pcf8574_kp_driver); | ||
228 | } | ||
229 | module_exit(pcf8574_kp_exit); | ||
230 | 220 | ||
231 | MODULE_AUTHOR("Michael Hennerich"); | 221 | MODULE_AUTHOR("Michael Hennerich"); |
232 | MODULE_DESCRIPTION("Keypad input driver for 16 keys connected to PCF8574"); | 222 | MODULE_DESCRIPTION("Keypad input driver for 16 keys connected to PCF8574"); |