diff options
author | Laurent Pinchart <laurent.pinchart@ideasonboard.com> | 2010-09-24 08:27:03 -0400 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2010-10-22 19:53:52 -0400 |
commit | 2001f99947017e378e55943a350c67a8fca9e9b6 (patch) | |
tree | 6ebe40a702465ba78ca7b9c46a88fcd66dfa2e09 | |
parent | cb9bc962a10144d3a70651f1f5c755b34d8d5bf4 (diff) |
[media] soc_camera: Don't use module names to load I2C modules
With the v4l2_i2c_new_subdev* functions now supporting loading modules
based on modaliases, remove the module names hardcoded in platform data
and pass a NULL module name to those functions.
All corresponding I2C modules have been checked, and all of them include
a module aliases table with names corresponding to what the soc_camera
platform data uses.
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
-rw-r--r-- | arch/arm/mach-mx3/mach-pcm037.c | 2 | ||||
-rw-r--r-- | arch/arm/mach-mx3/mx31moboard-marxbot.c | 1 | ||||
-rw-r--r-- | arch/arm/mach-mx3/mx31moboard-smartbot.c | 1 | ||||
-rw-r--r-- | arch/arm/mach-pxa/em-x270.c | 1 | ||||
-rw-r--r-- | arch/arm/mach-pxa/ezx.c | 2 | ||||
-rw-r--r-- | arch/arm/mach-pxa/mioa701.c | 1 | ||||
-rw-r--r-- | arch/arm/mach-pxa/pcm990-baseboard.c | 2 | ||||
-rw-r--r-- | arch/sh/boards/mach-ap325rxa/setup.c | 1 | ||||
-rw-r--r-- | arch/sh/boards/mach-ecovec24/setup.c | 3 | ||||
-rw-r--r-- | arch/sh/boards/mach-kfr2r09/setup.c | 1 | ||||
-rw-r--r-- | arch/sh/boards/mach-migor/setup.c | 2 | ||||
-rw-r--r-- | drivers/media/video/soc_camera.c | 2 |
12 files changed, 1 insertions, 18 deletions
diff --git a/arch/arm/mach-mx3/mach-pcm037.c b/arch/arm/mach-mx3/mach-pcm037.c index 214de11b20b..b3288979833 100644 --- a/arch/arm/mach-mx3/mach-pcm037.c +++ b/arch/arm/mach-mx3/mach-pcm037.c | |||
@@ -311,7 +311,6 @@ static struct soc_camera_link iclink_mt9v022 = { | |||
311 | .bus_id = 0, /* Must match with the camera ID */ | 311 | .bus_id = 0, /* Must match with the camera ID */ |
312 | .board_info = &pcm037_i2c_camera[1], | 312 | .board_info = &pcm037_i2c_camera[1], |
313 | .i2c_adapter_id = 2, | 313 | .i2c_adapter_id = 2, |
314 | .module_name = "mt9v022", | ||
315 | }; | 314 | }; |
316 | 315 | ||
317 | static struct soc_camera_link iclink_mt9t031 = { | 316 | static struct soc_camera_link iclink_mt9t031 = { |
@@ -319,7 +318,6 @@ static struct soc_camera_link iclink_mt9t031 = { | |||
319 | .power = pcm037_camera_power, | 318 | .power = pcm037_camera_power, |
320 | .board_info = &pcm037_i2c_camera[0], | 319 | .board_info = &pcm037_i2c_camera[0], |
321 | .i2c_adapter_id = 2, | 320 | .i2c_adapter_id = 2, |
322 | .module_name = "mt9t031", | ||
323 | }; | 321 | }; |
324 | 322 | ||
325 | static struct i2c_board_info pcm037_i2c_devices[] = { | 323 | static struct i2c_board_info pcm037_i2c_devices[] = { |
diff --git a/arch/arm/mach-mx3/mx31moboard-marxbot.c b/arch/arm/mach-mx3/mx31moboard-marxbot.c index 0551eb39d97..18069cb7d06 100644 --- a/arch/arm/mach-mx3/mx31moboard-marxbot.c +++ b/arch/arm/mach-mx3/mx31moboard-marxbot.c | |||
@@ -179,7 +179,6 @@ static struct soc_camera_link base_iclink = { | |||
179 | .reset = marxbot_basecam_reset, | 179 | .reset = marxbot_basecam_reset, |
180 | .board_info = &marxbot_i2c_devices[0], | 180 | .board_info = &marxbot_i2c_devices[0], |
181 | .i2c_adapter_id = 0, | 181 | .i2c_adapter_id = 0, |
182 | .module_name = "mt9t031", | ||
183 | }; | 182 | }; |
184 | 183 | ||
185 | static struct platform_device marxbot_camera[] = { | 184 | static struct platform_device marxbot_camera[] = { |
diff --git a/arch/arm/mach-mx3/mx31moboard-smartbot.c b/arch/arm/mach-mx3/mx31moboard-smartbot.c index 417757e78c6..04760a53005 100644 --- a/arch/arm/mach-mx3/mx31moboard-smartbot.c +++ b/arch/arm/mach-mx3/mx31moboard-smartbot.c | |||
@@ -88,7 +88,6 @@ static struct soc_camera_link base_iclink = { | |||
88 | .reset = smartbot_cam_reset, | 88 | .reset = smartbot_cam_reset, |
89 | .board_info = &smartbot_i2c_devices[0], | 89 | .board_info = &smartbot_i2c_devices[0], |
90 | .i2c_adapter_id = 0, | 90 | .i2c_adapter_id = 0, |
91 | .module_name = "mt9t031", | ||
92 | }; | 91 | }; |
93 | 92 | ||
94 | static struct platform_device smartbot_camera[] = { | 93 | static struct platform_device smartbot_camera[] = { |
diff --git a/arch/arm/mach-pxa/em-x270.c b/arch/arm/mach-pxa/em-x270.c index 0517c17978f..0c95476c791 100644 --- a/arch/arm/mach-pxa/em-x270.c +++ b/arch/arm/mach-pxa/em-x270.c | |||
@@ -1015,7 +1015,6 @@ static struct soc_camera_link iclink = { | |||
1015 | .power = em_x270_sensor_power, | 1015 | .power = em_x270_sensor_power, |
1016 | .board_info = &em_x270_i2c_cam_info[0], | 1016 | .board_info = &em_x270_i2c_cam_info[0], |
1017 | .i2c_adapter_id = 0, | 1017 | .i2c_adapter_id = 0, |
1018 | .module_name = "mt9m111", | ||
1019 | }; | 1018 | }; |
1020 | 1019 | ||
1021 | static struct platform_device em_x270_camera = { | 1020 | static struct platform_device em_x270_camera = { |
diff --git a/arch/arm/mach-pxa/ezx.c b/arch/arm/mach-pxa/ezx.c index 626c82b1397..70dfe0867ef 100644 --- a/arch/arm/mach-pxa/ezx.c +++ b/arch/arm/mach-pxa/ezx.c | |||
@@ -753,7 +753,6 @@ static struct soc_camera_link a780_iclink = { | |||
753 | .flags = SOCAM_SENSOR_INVERT_PCLK, | 753 | .flags = SOCAM_SENSOR_INVERT_PCLK, |
754 | .i2c_adapter_id = 0, | 754 | .i2c_adapter_id = 0, |
755 | .board_info = &a780_camera_i2c_board_info, | 755 | .board_info = &a780_camera_i2c_board_info, |
756 | .module_name = "mt9m111", | ||
757 | .power = a780_camera_power, | 756 | .power = a780_camera_power, |
758 | .reset = a780_camera_reset, | 757 | .reset = a780_camera_reset, |
759 | }; | 758 | }; |
@@ -1025,7 +1024,6 @@ static struct soc_camera_link a910_iclink = { | |||
1025 | .bus_id = 0, | 1024 | .bus_id = 0, |
1026 | .i2c_adapter_id = 0, | 1025 | .i2c_adapter_id = 0, |
1027 | .board_info = &a910_camera_i2c_board_info, | 1026 | .board_info = &a910_camera_i2c_board_info, |
1028 | .module_name = "mt9m111", | ||
1029 | .power = a910_camera_power, | 1027 | .power = a910_camera_power, |
1030 | .reset = a910_camera_reset, | 1028 | .reset = a910_camera_reset, |
1031 | }; | 1029 | }; |
diff --git a/arch/arm/mach-pxa/mioa701.c b/arch/arm/mach-pxa/mioa701.c index dc66942ef9a..83734c8b4b5 100644 --- a/arch/arm/mach-pxa/mioa701.c +++ b/arch/arm/mach-pxa/mioa701.c | |||
@@ -711,7 +711,6 @@ static struct soc_camera_link iclink = { | |||
711 | .bus_id = 0, /* Match id in pxa27x_device_camera in device.c */ | 711 | .bus_id = 0, /* Match id in pxa27x_device_camera in device.c */ |
712 | .board_info = &mioa701_i2c_devices[0], | 712 | .board_info = &mioa701_i2c_devices[0], |
713 | .i2c_adapter_id = 0, | 713 | .i2c_adapter_id = 0, |
714 | .module_name = "mt9m111", | ||
715 | }; | 714 | }; |
716 | 715 | ||
717 | struct i2c_pxa_platform_data i2c_pdata = { | 716 | struct i2c_pxa_platform_data i2c_pdata = { |
diff --git a/arch/arm/mach-pxa/pcm990-baseboard.c b/arch/arm/mach-pxa/pcm990-baseboard.c index f56ae100875..f33647a8e0b 100644 --- a/arch/arm/mach-pxa/pcm990-baseboard.c +++ b/arch/arm/mach-pxa/pcm990-baseboard.c | |||
@@ -453,7 +453,6 @@ static struct soc_camera_link iclink[] = { | |||
453 | .query_bus_param = pcm990_camera_query_bus_param, | 453 | .query_bus_param = pcm990_camera_query_bus_param, |
454 | .set_bus_param = pcm990_camera_set_bus_param, | 454 | .set_bus_param = pcm990_camera_set_bus_param, |
455 | .free_bus = pcm990_camera_free_bus, | 455 | .free_bus = pcm990_camera_free_bus, |
456 | .module_name = "mt9v022", | ||
457 | }, { | 456 | }, { |
458 | .bus_id = 0, /* Must match with the camera ID */ | 457 | .bus_id = 0, /* Must match with the camera ID */ |
459 | .board_info = &pcm990_camera_i2c[1], | 458 | .board_info = &pcm990_camera_i2c[1], |
@@ -461,7 +460,6 @@ static struct soc_camera_link iclink[] = { | |||
461 | .query_bus_param = pcm990_camera_query_bus_param, | 460 | .query_bus_param = pcm990_camera_query_bus_param, |
462 | .set_bus_param = pcm990_camera_set_bus_param, | 461 | .set_bus_param = pcm990_camera_set_bus_param, |
463 | .free_bus = pcm990_camera_free_bus, | 462 | .free_bus = pcm990_camera_free_bus, |
464 | .module_name = "mt9m001", | ||
465 | }, | 463 | }, |
466 | }; | 464 | }; |
467 | 465 | ||
diff --git a/arch/sh/boards/mach-ap325rxa/setup.c b/arch/sh/boards/mach-ap325rxa/setup.c index 3da116f47f0..881a3a5f564 100644 --- a/arch/sh/boards/mach-ap325rxa/setup.c +++ b/arch/sh/boards/mach-ap325rxa/setup.c | |||
@@ -481,7 +481,6 @@ static struct soc_camera_link ov7725_link = { | |||
481 | .power = ov7725_power, | 481 | .power = ov7725_power, |
482 | .board_info = &ap325rxa_i2c_camera[0], | 482 | .board_info = &ap325rxa_i2c_camera[0], |
483 | .i2c_adapter_id = 0, | 483 | .i2c_adapter_id = 0, |
484 | .module_name = "ov772x", | ||
485 | .priv = &ov7725_info, | 484 | .priv = &ov7725_info, |
486 | }; | 485 | }; |
487 | 486 | ||
diff --git a/arch/sh/boards/mach-ecovec24/setup.c b/arch/sh/boards/mach-ecovec24/setup.c index 4a9fa5d3854..ae0b1382284 100644 --- a/arch/sh/boards/mach-ecovec24/setup.c +++ b/arch/sh/boards/mach-ecovec24/setup.c | |||
@@ -620,7 +620,6 @@ static struct soc_camera_link tw9910_link = { | |||
620 | .bus_id = 1, | 620 | .bus_id = 1, |
621 | .power = tw9910_power, | 621 | .power = tw9910_power, |
622 | .board_info = &i2c_camera[0], | 622 | .board_info = &i2c_camera[0], |
623 | .module_name = "tw9910", | ||
624 | .priv = &tw9910_info, | 623 | .priv = &tw9910_info, |
625 | }; | 624 | }; |
626 | 625 | ||
@@ -644,7 +643,6 @@ static struct soc_camera_link mt9t112_link1 = { | |||
644 | .power = mt9t112_power1, | 643 | .power = mt9t112_power1, |
645 | .bus_id = 0, | 644 | .bus_id = 0, |
646 | .board_info = &i2c_camera[1], | 645 | .board_info = &i2c_camera[1], |
647 | .module_name = "mt9t112", | ||
648 | .priv = &mt9t112_info1, | 646 | .priv = &mt9t112_info1, |
649 | }; | 647 | }; |
650 | 648 | ||
@@ -667,7 +665,6 @@ static struct soc_camera_link mt9t112_link2 = { | |||
667 | .power = mt9t112_power2, | 665 | .power = mt9t112_power2, |
668 | .bus_id = 1, | 666 | .bus_id = 1, |
669 | .board_info = &i2c_camera[2], | 667 | .board_info = &i2c_camera[2], |
670 | .module_name = "mt9t112", | ||
671 | .priv = &mt9t112_info2, | 668 | .priv = &mt9t112_info2, |
672 | }; | 669 | }; |
673 | 670 | ||
diff --git a/arch/sh/boards/mach-kfr2r09/setup.c b/arch/sh/boards/mach-kfr2r09/setup.c index 68994a163f6..1742849db64 100644 --- a/arch/sh/boards/mach-kfr2r09/setup.c +++ b/arch/sh/boards/mach-kfr2r09/setup.c | |||
@@ -333,7 +333,6 @@ static struct soc_camera_link rj54n1_link = { | |||
333 | .power = camera_power, | 333 | .power = camera_power, |
334 | .board_info = &kfr2r09_i2c_camera, | 334 | .board_info = &kfr2r09_i2c_camera, |
335 | .i2c_adapter_id = 1, | 335 | .i2c_adapter_id = 1, |
336 | .module_name = "rj54n1cb0c", | ||
337 | .priv = &rj54n1_priv, | 336 | .priv = &rj54n1_priv, |
338 | }; | 337 | }; |
339 | 338 | ||
diff --git a/arch/sh/boards/mach-migor/setup.c b/arch/sh/boards/mach-migor/setup.c index 662debe4ead..03af8484255 100644 --- a/arch/sh/boards/mach-migor/setup.c +++ b/arch/sh/boards/mach-migor/setup.c | |||
@@ -450,7 +450,6 @@ static struct soc_camera_link ov7725_link = { | |||
450 | .power = ov7725_power, | 450 | .power = ov7725_power, |
451 | .board_info = &migor_i2c_camera[0], | 451 | .board_info = &migor_i2c_camera[0], |
452 | .i2c_adapter_id = 0, | 452 | .i2c_adapter_id = 0, |
453 | .module_name = "ov772x", | ||
454 | .priv = &ov7725_info, | 453 | .priv = &ov7725_info, |
455 | }; | 454 | }; |
456 | 455 | ||
@@ -463,7 +462,6 @@ static struct soc_camera_link tw9910_link = { | |||
463 | .power = tw9910_power, | 462 | .power = tw9910_power, |
464 | .board_info = &migor_i2c_camera[1], | 463 | .board_info = &migor_i2c_camera[1], |
465 | .i2c_adapter_id = 0, | 464 | .i2c_adapter_id = 0, |
466 | .module_name = "tw9910", | ||
467 | .priv = &tw9910_info, | 465 | .priv = &tw9910_info, |
468 | }; | 466 | }; |
469 | 467 | ||
diff --git a/drivers/media/video/soc_camera.c b/drivers/media/video/soc_camera.c index c11a080b06a..43848a751d1 100644 --- a/drivers/media/video/soc_camera.c +++ b/drivers/media/video/soc_camera.c | |||
@@ -896,7 +896,7 @@ static int soc_camera_init_i2c(struct soc_camera_device *icd, | |||
896 | icl->board_info->platform_data = icd; | 896 | icl->board_info->platform_data = icd; |
897 | 897 | ||
898 | subdev = v4l2_i2c_new_subdev_board(&ici->v4l2_dev, adap, | 898 | subdev = v4l2_i2c_new_subdev_board(&ici->v4l2_dev, adap, |
899 | icl->module_name, icl->board_info, NULL); | 899 | NULL, icl->board_info, NULL); |
900 | if (!subdev) | 900 | if (!subdev) |
901 | goto ei2cnd; | 901 | goto ei2cnd; |
902 | 902 | ||