aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media
diff options
context:
space:
mode:
authorLaurent Pinchart <laurent.pinchart@ideasonboard.com>2010-09-24 07:19:18 -0400
committerMauro Carvalho Chehab <mchehab@redhat.com>2010-10-22 19:52:28 -0400
commit99f7d81bd7c33a31cbd8c87757fa4faa8c6b1425 (patch)
tree41b58bf1e58a669014fbeaadbd683c9598337849 /drivers/media
parent50fbc5a463d48525eca9b4cb78d7ad4818d39532 (diff)
[media] zoran: Don't use module names to load I2C modules
With the v4l2_i2c_new_subdev* functions now supporting loading modules based on modaliases, replace the hardcoded module name passed to those functions by NULL. All corresponding I2C modules have been checked, and all of them include a module aliases table with names corresponding to what the zoran driver uses. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media')
-rw-r--r--drivers/media/video/zoran/zoran.h2
-rw-r--r--drivers/media/video/zoran/zoran_card.c23
2 files changed, 3 insertions, 22 deletions
diff --git a/drivers/media/video/zoran/zoran.h b/drivers/media/video/zoran/zoran.h
index 307e847fe1cd..37fe16181e3c 100644
--- a/drivers/media/video/zoran/zoran.h
+++ b/drivers/media/video/zoran/zoran.h
@@ -341,10 +341,8 @@ struct card_info {
341 enum card_type type; 341 enum card_type type;
342 char name[32]; 342 char name[32];
343 const char *i2c_decoder; /* i2c decoder device */ 343 const char *i2c_decoder; /* i2c decoder device */
344 const char *mod_decoder; /* i2c decoder module */
345 const unsigned short *addrs_decoder; 344 const unsigned short *addrs_decoder;
346 const char *i2c_encoder; /* i2c encoder device */ 345 const char *i2c_encoder; /* i2c encoder device */
347 const char *mod_encoder; /* i2c encoder module */
348 const unsigned short *addrs_encoder; 346 const unsigned short *addrs_encoder;
349 u16 video_vfe, video_codec; /* videocodec types */ 347 u16 video_vfe, video_codec; /* videocodec types */
350 u16 audio_chip; /* audio type */ 348 u16 audio_chip; /* audio type */
diff --git a/drivers/media/video/zoran/zoran_card.c b/drivers/media/video/zoran/zoran_card.c
index bfcd3aef50f9..0aac376c3f7a 100644
--- a/drivers/media/video/zoran/zoran_card.c
+++ b/drivers/media/video/zoran/zoran_card.c
@@ -379,7 +379,6 @@ static struct card_info zoran_cards[NUM_CARDS] __devinitdata = {
379 .type = DC10_old, 379 .type = DC10_old,
380 .name = "DC10(old)", 380 .name = "DC10(old)",
381 .i2c_decoder = "vpx3220a", 381 .i2c_decoder = "vpx3220a",
382 .mod_decoder = "vpx3220",
383 .addrs_decoder = vpx3220_addrs, 382 .addrs_decoder = vpx3220_addrs,
384 .video_codec = CODEC_TYPE_ZR36050, 383 .video_codec = CODEC_TYPE_ZR36050,
385 .video_vfe = CODEC_TYPE_ZR36016, 384 .video_vfe = CODEC_TYPE_ZR36016,
@@ -409,10 +408,8 @@ static struct card_info zoran_cards[NUM_CARDS] __devinitdata = {
409 .type = DC10_new, 408 .type = DC10_new,
410 .name = "DC10(new)", 409 .name = "DC10(new)",
411 .i2c_decoder = "saa7110", 410 .i2c_decoder = "saa7110",
412 .mod_decoder = "saa7110",
413 .addrs_decoder = saa7110_addrs, 411 .addrs_decoder = saa7110_addrs,
414 .i2c_encoder = "adv7175", 412 .i2c_encoder = "adv7175",
415 .mod_encoder = "adv7175",
416 .addrs_encoder = adv717x_addrs, 413 .addrs_encoder = adv717x_addrs,
417 .video_codec = CODEC_TYPE_ZR36060, 414 .video_codec = CODEC_TYPE_ZR36060,
418 415
@@ -440,10 +437,8 @@ static struct card_info zoran_cards[NUM_CARDS] __devinitdata = {
440 .type = DC10plus, 437 .type = DC10plus,
441 .name = "DC10plus", 438 .name = "DC10plus",
442 .i2c_decoder = "saa7110", 439 .i2c_decoder = "saa7110",
443 .mod_decoder = "saa7110",
444 .addrs_decoder = saa7110_addrs, 440 .addrs_decoder = saa7110_addrs,
445 .i2c_encoder = "adv7175", 441 .i2c_encoder = "adv7175",
446 .mod_encoder = "adv7175",
447 .addrs_encoder = adv717x_addrs, 442 .addrs_encoder = adv717x_addrs,
448 .video_codec = CODEC_TYPE_ZR36060, 443 .video_codec = CODEC_TYPE_ZR36060,
449 444
@@ -472,10 +467,8 @@ static struct card_info zoran_cards[NUM_CARDS] __devinitdata = {
472 .type = DC30, 467 .type = DC30,
473 .name = "DC30", 468 .name = "DC30",
474 .i2c_decoder = "vpx3220a", 469 .i2c_decoder = "vpx3220a",
475 .mod_decoder = "vpx3220",
476 .addrs_decoder = vpx3220_addrs, 470 .addrs_decoder = vpx3220_addrs,
477 .i2c_encoder = "adv7175", 471 .i2c_encoder = "adv7175",
478 .mod_encoder = "adv7175",
479 .addrs_encoder = adv717x_addrs, 472 .addrs_encoder = adv717x_addrs,
480 .video_codec = CODEC_TYPE_ZR36050, 473 .video_codec = CODEC_TYPE_ZR36050,
481 .video_vfe = CODEC_TYPE_ZR36016, 474 .video_vfe = CODEC_TYPE_ZR36016,
@@ -505,10 +498,8 @@ static struct card_info zoran_cards[NUM_CARDS] __devinitdata = {
505 .type = DC30plus, 498 .type = DC30plus,
506 .name = "DC30plus", 499 .name = "DC30plus",
507 .i2c_decoder = "vpx3220a", 500 .i2c_decoder = "vpx3220a",
508 .mod_decoder = "vpx3220",
509 .addrs_decoder = vpx3220_addrs, 501 .addrs_decoder = vpx3220_addrs,
510 .i2c_encoder = "adv7175", 502 .i2c_encoder = "adv7175",
511 .mod_encoder = "adv7175",
512 .addrs_encoder = adv717x_addrs, 503 .addrs_encoder = adv717x_addrs,
513 .video_codec = CODEC_TYPE_ZR36050, 504 .video_codec = CODEC_TYPE_ZR36050,
514 .video_vfe = CODEC_TYPE_ZR36016, 505 .video_vfe = CODEC_TYPE_ZR36016,
@@ -538,10 +529,8 @@ static struct card_info zoran_cards[NUM_CARDS] __devinitdata = {
538 .type = LML33, 529 .type = LML33,
539 .name = "LML33", 530 .name = "LML33",
540 .i2c_decoder = "bt819a", 531 .i2c_decoder = "bt819a",
541 .mod_decoder = "bt819",
542 .addrs_decoder = bt819_addrs, 532 .addrs_decoder = bt819_addrs,
543 .i2c_encoder = "bt856", 533 .i2c_encoder = "bt856",
544 .mod_encoder = "bt856",
545 .addrs_encoder = bt856_addrs, 534 .addrs_encoder = bt856_addrs,
546 .video_codec = CODEC_TYPE_ZR36060, 535 .video_codec = CODEC_TYPE_ZR36060,
547 536
@@ -569,10 +558,8 @@ static struct card_info zoran_cards[NUM_CARDS] __devinitdata = {
569 .type = LML33R10, 558 .type = LML33R10,
570 .name = "LML33R10", 559 .name = "LML33R10",
571 .i2c_decoder = "saa7114", 560 .i2c_decoder = "saa7114",
572 .mod_decoder = "saa7115",
573 .addrs_decoder = saa7114_addrs, 561 .addrs_decoder = saa7114_addrs,
574 .i2c_encoder = "adv7170", 562 .i2c_encoder = "adv7170",
575 .mod_encoder = "adv7170",
576 .addrs_encoder = adv717x_addrs, 563 .addrs_encoder = adv717x_addrs,
577 .video_codec = CODEC_TYPE_ZR36060, 564 .video_codec = CODEC_TYPE_ZR36060,
578 565
@@ -600,10 +587,8 @@ static struct card_info zoran_cards[NUM_CARDS] __devinitdata = {
600 .type = BUZ, 587 .type = BUZ,
601 .name = "Buz", 588 .name = "Buz",
602 .i2c_decoder = "saa7111", 589 .i2c_decoder = "saa7111",
603 .mod_decoder = "saa7115",
604 .addrs_decoder = saa7111_addrs, 590 .addrs_decoder = saa7111_addrs,
605 .i2c_encoder = "saa7185", 591 .i2c_encoder = "saa7185",
606 .mod_encoder = "saa7185",
607 .addrs_encoder = saa7185_addrs, 592 .addrs_encoder = saa7185_addrs,
608 .video_codec = CODEC_TYPE_ZR36060, 593 .video_codec = CODEC_TYPE_ZR36060,
609 594
@@ -633,10 +618,8 @@ static struct card_info zoran_cards[NUM_CARDS] __devinitdata = {
633 /* AverMedia chose not to brand the 6-Eyes. Thus it 618 /* AverMedia chose not to brand the 6-Eyes. Thus it
634 can't be autodetected, and requires card=x. */ 619 can't be autodetected, and requires card=x. */
635 .i2c_decoder = "ks0127", 620 .i2c_decoder = "ks0127",
636 .mod_decoder = "ks0127",
637 .addrs_decoder = ks0127_addrs, 621 .addrs_decoder = ks0127_addrs,
638 .i2c_encoder = "bt866", 622 .i2c_encoder = "bt866",
639 .mod_encoder = "bt866",
640 .addrs_encoder = bt866_addrs, 623 .addrs_encoder = bt866_addrs,
641 .video_codec = CODEC_TYPE_ZR36060, 624 .video_codec = CODEC_TYPE_ZR36060,
642 625
@@ -1359,13 +1342,13 @@ static int __devinit zoran_probe(struct pci_dev *pdev,
1359 } 1342 }
1360 1343
1361 zr->decoder = v4l2_i2c_new_subdev(&zr->v4l2_dev, 1344 zr->decoder = v4l2_i2c_new_subdev(&zr->v4l2_dev,
1362 &zr->i2c_adapter, zr->card.mod_decoder, zr->card.i2c_decoder, 1345 &zr->i2c_adapter, NULL, zr->card.i2c_decoder,
1363 0, zr->card.addrs_decoder); 1346 0, zr->card.addrs_decoder);
1364 1347
1365 if (zr->card.mod_encoder) 1348 if (zr->card.i2c_encoder)
1366 zr->encoder = v4l2_i2c_new_subdev(&zr->v4l2_dev, 1349 zr->encoder = v4l2_i2c_new_subdev(&zr->v4l2_dev,
1367 &zr->i2c_adapter, 1350 &zr->i2c_adapter,
1368 zr->card.mod_encoder, zr->card.i2c_encoder, 1351 NULL, zr->card.i2c_encoder,
1369 0, zr->card.addrs_encoder); 1352 0, zr->card.addrs_encoder);
1370 1353
1371 dprintk(2, 1354 dprintk(2,