commit | 09a0d183ef3d310ee9d0b835d9db741fda9d6d46 | [log] [tgz] |
---|---|---|
author | Axel Lin <[email protected]> | Tue Jan 10 15:09:27 2012 -0800 |
committer | Linus Torvalds <[email protected]> | Tue Jan 10 16:30:48 2012 -0800 |
tree | 8ccf315879a3152eba11961885f5f589088dc9da | |
parent | 892a8843fbef07a7f2ab62d5f7ff5c16ea0903b0 [diff] [blame] |
leds: convert led i2c drivers to module_i2c_driver Factor out some boilerplate code for i2c driver registration into module_i2c_driver. Signed-off-by: Axel Lin <[email protected]> Cc: Haojian Zhuang <[email protected]> Cc: Mark Brown <[email protected]> Cc: Richard Purdie <[email protected]> Cc: Michael Hennerich <[email protected]> Cc: Mike Rapoport <[email protected]> Cc: Guennadi Liakhovetski <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
diff --git a/drivers/leds/leds-pca955x.c b/drivers/leds/leds-pca955x.c index 66aa3e8..dcc3bc3 100644 --- a/drivers/leds/leds-pca955x.c +++ b/drivers/leds/leds-pca955x.c
@@ -371,18 +371,7 @@ .id_table = pca955x_id, }; -static int __init pca955x_leds_init(void) -{ - return i2c_add_driver(&pca955x_driver); -} - -static void __exit pca955x_leds_exit(void) -{ - i2c_del_driver(&pca955x_driver); -} - -module_init(pca955x_leds_init); -module_exit(pca955x_leds_exit); +module_i2c_driver(pca955x_driver); MODULE_AUTHOR("Nate Case <[email protected]>"); MODULE_DESCRIPTION("PCA955x LED driver");