diff options
author | Axel Lin <axel.lin@gmail.com> | 2012-02-12 04:56:32 -0500 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2012-03-08 06:48:01 -0500 |
commit | c6e8d86fffd8edf1bfccbd441b1812ee919fe3d5 (patch) | |
tree | 3b4a8b33ebf13cfc33513ef8b7c9f2e8ba50f2d9 /drivers/media/video/ir-kbd-i2c.c | |
parent | a2d2b25ce623757a87b35ef336d2d2c3b0a6fa13 (diff) |
[media] convert drivers/media/* to use module_i2c_driver()
This patch converts the drivers in drivers/media/* to use the
module_i2_driver() macro which makes the code smaller and a bit simpler.
Signed-off-by: Axel Lin <axel.lin@gmail.com>
Cc: Kyungmin Park <kyungmin.park@samsung.com>
Cc: Heungjun Kim <riverful.kim@samsung.com>
Cc: Joonyoung Shim <jy0922.shim@samsung.com>
Cc: Andrew Chew <achew@nvidia.com>
Cc: Paul Mundt <lethal@linux-sh.org>
Cc: Michael Grzeschik <m.grzeschik@pengutronix.de>
Cc: Johannes Obermaier <johannes.obermaier@gmail.com>
Cc: Steven Toth <stoth@kernellabs.com>
Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Acked-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Acked-by: Tomasz Stanislawski <t.stanislaws@samsung.com>
Acked-by: Hans Verkuil <hans.verkuil@cisco.com>
Acked-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Acked-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Acked-by: Jonathan Corbet <corbet@lwn.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/video/ir-kbd-i2c.c')
-rw-r--r-- | drivers/media/video/ir-kbd-i2c.c | 17 |
1 files changed, 3 insertions, 14 deletions
diff --git a/drivers/media/video/ir-kbd-i2c.c b/drivers/media/video/ir-kbd-i2c.c index a7c41d32f414..04f192a0398a 100644 --- a/drivers/media/video/ir-kbd-i2c.c +++ b/drivers/media/video/ir-kbd-i2c.c | |||
@@ -471,7 +471,7 @@ static const struct i2c_device_id ir_kbd_id[] = { | |||
471 | { } | 471 | { } |
472 | }; | 472 | }; |
473 | 473 | ||
474 | static struct i2c_driver driver = { | 474 | static struct i2c_driver ir_kbd_driver = { |
475 | .driver = { | 475 | .driver = { |
476 | .name = "ir-kbd-i2c", | 476 | .name = "ir-kbd-i2c", |
477 | }, | 477 | }, |
@@ -480,21 +480,10 @@ static struct i2c_driver driver = { | |||
480 | .id_table = ir_kbd_id, | 480 | .id_table = ir_kbd_id, |
481 | }; | 481 | }; |
482 | 482 | ||
483 | module_i2c_driver(ir_kbd_driver); | ||
484 | |||
483 | /* ----------------------------------------------------------------------- */ | 485 | /* ----------------------------------------------------------------------- */ |
484 | 486 | ||
485 | MODULE_AUTHOR("Gerd Knorr, Michal Kochanowicz, Christoph Bartelmus, Ulrich Mueller"); | 487 | MODULE_AUTHOR("Gerd Knorr, Michal Kochanowicz, Christoph Bartelmus, Ulrich Mueller"); |
486 | MODULE_DESCRIPTION("input driver for i2c IR remote controls"); | 488 | MODULE_DESCRIPTION("input driver for i2c IR remote controls"); |
487 | MODULE_LICENSE("GPL"); | 489 | MODULE_LICENSE("GPL"); |
488 | |||
489 | static int __init ir_init(void) | ||
490 | { | ||
491 | return i2c_add_driver(&driver); | ||
492 | } | ||
493 | |||
494 | static void __exit ir_fini(void) | ||
495 | { | ||
496 | i2c_del_driver(&driver); | ||
497 | } | ||
498 | |||
499 | module_init(ir_init); | ||
500 | module_exit(ir_fini); | ||