aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/video/em28xx/em28xx-i2c.c
diff options
context:
space:
mode:
authorMauro Carvalho Chehab <mchehab@infradead.org>2007-10-18 18:56:47 -0400
committerMauro Carvalho Chehab <mchehab@infradead.org>2008-01-25 16:00:54 -0500
commit7f1711234e6a21c153e892758d9d82c333ab37ac (patch)
tree19281fdae9f51a25c119dccf54515192614b242f /drivers/media/video/em28xx/em28xx-i2c.c
parent2d94dfc8c38edf63e91e48fd55c3a8822b6a9ced (diff)
V4L/DVB (6384): Replace TDA9887_SET_CONFIG by TUNER_SET_CONFIG
Currently, the only tuner-specific device that allows special configurations is tda9887. However, tea5767 also may require some special configurations (for example, to specify a different Xtal freq). This patch replaces TDA9887_SET_CONFIG by a more generic internal ioctl (TUNER_SET_CONFIG). The newer one allows specifying what tuner is appliable to a configuration set, and allows an arbitrary configuration struct. Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Diffstat (limited to 'drivers/media/video/em28xx/em28xx-i2c.c')
-rw-r--r--drivers/media/video/em28xx/em28xx-i2c.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/drivers/media/video/em28xx/em28xx-i2c.c b/drivers/media/video/em28xx/em28xx-i2c.c
index e3a4aa7a9df4..e48191fb1dde 100644
--- a/drivers/media/video/em28xx/em28xx-i2c.c
+++ b/drivers/media/video/em28xx/em28xx-i2c.c
@@ -421,6 +421,8 @@ static int attach_inform(struct i2c_client *client)
421 case 0x96: 421 case 0x96:
422 case 0x94: 422 case 0x94:
423 { 423 {
424 struct v4l2_priv_tun_config tda9887_cfg;
425
424 struct tuner_setup tun_setup; 426 struct tuner_setup tun_setup;
425 427
426 tun_setup.mode_mask = T_ANALOG_TV | T_RADIO; 428 tun_setup.mode_mask = T_ANALOG_TV | T_RADIO;
@@ -428,7 +430,11 @@ static int attach_inform(struct i2c_client *client)
428 tun_setup.addr = client->addr; 430 tun_setup.addr = client->addr;
429 431
430 em28xx_i2c_call_clients(dev, TUNER_SET_TYPE_ADDR, &tun_setup); 432 em28xx_i2c_call_clients(dev, TUNER_SET_TYPE_ADDR, &tun_setup);
431 em28xx_i2c_call_clients(dev, TDA9887_SET_CONFIG, &dev->tda9887_conf); 433
434 tda9887_cfg.tuner = TUNER_TDA9887;
435 tda9887_cfg.priv = &dev->tda9887_conf;
436 em28xx_i2c_call_clients(dev, TUNER_SET_CONFIG,
437 &tda9887_cfg);
432 break; 438 break;
433 } 439 }
434 case 0x42: 440 case 0x42: