aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media
diff options
context:
space:
mode:
authorJean Delvare <khali@linux-fr.org>2008-04-29 17:11:40 -0400
committerJean Delvare <khali@hyperion.delvare>2008-04-29 17:11:40 -0400
commit3760f736716f74bdc62a4ba5406934338da93eb2 (patch)
treee28e22c6655dd62566f1b7a99f9354a31bf9d06e /drivers/media
parentd2653e92732bd3911feff6bee5e23dbf959381db (diff)
i2c: Convert most new-style drivers to use module aliasing
Based on earlier work by Jon Smirl and Jochen Friedrich. Update most new-style i2c drivers to use standard module aliasing instead of the old driver_name/type driver matching scheme. I've left the video drivers apart (except for SoC camera drivers) as they're a bit more diffcult to deal with, they'll have their own patch later. Signed-off-by: Jean Delvare <khali@linux-fr.org> Cc: Jon Smirl <jonsmirl@gmail.com> Cc: Jochen Friedrich <jochen@scram.de>
Diffstat (limited to 'drivers/media')
-rw-r--r--drivers/media/video/mt9m001.c7
-rw-r--r--drivers/media/video/mt9v022.c7
2 files changed, 14 insertions, 0 deletions
diff --git a/drivers/media/video/mt9m001.c b/drivers/media/video/mt9m001.c
index 26cb27604e0..ba09826ddf4 100644
--- a/drivers/media/video/mt9m001.c
+++ b/drivers/media/video/mt9m001.c
@@ -697,12 +697,19 @@ static int mt9m001_remove(struct i2c_client *client)
697 return 0; 697 return 0;
698} 698}
699 699
700static const struct i2c_device_id mt9m001_id[] = {
701 { "mt9m001", 0 },
702 { }
703};
704MODULE_DEVICE_TABLE(i2c, mt9m001_id);
705
700static struct i2c_driver mt9m001_i2c_driver = { 706static struct i2c_driver mt9m001_i2c_driver = {
701 .driver = { 707 .driver = {
702 .name = "mt9m001", 708 .name = "mt9m001",
703 }, 709 },
704 .probe = mt9m001_probe, 710 .probe = mt9m001_probe,
705 .remove = mt9m001_remove, 711 .remove = mt9m001_remove,
712 .id_table = mt9m001_id,
706}; 713};
707 714
708static int __init mt9m001_mod_init(void) 715static int __init mt9m001_mod_init(void)
diff --git a/drivers/media/video/mt9v022.c b/drivers/media/video/mt9v022.c
index 7b1dd7ede9d..7b223691ce9 100644
--- a/drivers/media/video/mt9v022.c
+++ b/drivers/media/video/mt9v022.c
@@ -819,12 +819,19 @@ static int mt9v022_remove(struct i2c_client *client)
819 return 0; 819 return 0;
820} 820}
821 821
822static const struct i2c_device_id mt9v022_id[] = {
823 { "mt9v022", 0 },
824 { }
825};
826MODULE_DEVICE_TABLE(i2c, mt9v022_id);
827
822static struct i2c_driver mt9v022_i2c_driver = { 828static struct i2c_driver mt9v022_i2c_driver = {
823 .driver = { 829 .driver = {
824 .name = "mt9v022", 830 .name = "mt9v022",
825 }, 831 },
826 .probe = mt9v022_probe, 832 .probe = mt9v022_probe,
827 .remove = mt9v022_remove, 833 .remove = mt9v022_remove,
834 .id_table = mt9v022_id,
828}; 835};
829 836
830static int __init mt9v022_mod_init(void) 837static int __init mt9v022_mod_init(void)