X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=drivers%2Fmedia%2Fvideo%2Fmxb.c;h=98ad3092a079cb7659c1f8c6c29c1e6bc3b1f557;hb=b31fde6db2b76a9f7f59bf016652b46cff43f8da;hp=eb3b31867494b0ac0bf97ae08f94c7c84d48ae20;hpb=b4d8d1a93c6ea042b29bb66fbb1cf6bc556c18f7;p=linux-2.6 diff --git a/drivers/media/video/mxb.c b/drivers/media/video/mxb.c index eb3b318674..98ad3092a0 100644 --- a/drivers/media/video/mxb.c +++ b/drivers/media/video/mxb.c @@ -153,17 +153,12 @@ static int mxb_probe(struct saa7146_dev* dev) { struct mxb* mxb = NULL; struct i2c_client *client; - struct list_head *item; int result; if ((result = request_module("saa7111")) < 0) { printk("mxb: saa7111 i2c module not available.\n"); return -ENODEV; } - if ((result = request_module("tuner")) < 0) { - printk("mxb: tuner i2c module not available.\n"); - return -ENODEV; - } if ((result = request_module("tea6420")) < 0) { printk("mxb: tea6420 i2c module not available.\n"); return -ENODEV; @@ -176,6 +171,10 @@ static int mxb_probe(struct saa7146_dev* dev) printk("mxb: tda9840 i2c module not available.\n"); return -ENODEV; } + if ((result = request_module("tuner")) < 0) { + printk("mxb: tuner i2c module not available.\n"); + return -ENODEV; + } mxb = kzalloc(sizeof(struct mxb), GFP_KERNEL); if( NULL == mxb ) { @@ -196,15 +195,14 @@ static int mxb_probe(struct saa7146_dev* dev) } /* loop through all i2c-devices on the bus and look who is there */ - list_for_each(item,&mxb->i2c_adapter.clients) { - client = list_entry(item, struct i2c_client, list); - if( I2C_TEA6420_1 == client->addr ) + list_for_each_entry(client, &mxb->i2c_adapter.clients, list) { + if( I2C_ADDR_TEA6420_1 == client->addr ) mxb->tea6420_1 = client; - if( I2C_TEA6420_2 == client->addr ) + if( I2C_ADDR_TEA6420_2 == client->addr ) mxb->tea6420_2 = client; if( I2C_TEA6415C_2 == client->addr ) mxb->tea6415c = client; - if( I2C_TDA9840 == client->addr ) + if( I2C_ADDR_TDA9840 == client->addr ) mxb->tda9840 = client; if( I2C_SAA7111 == client->addr ) mxb->saa7111a = client; @@ -790,6 +788,12 @@ static int mxb_ioctl(struct saa7146_fh *fh, unsigned int cmd, void *arg) DEB_D(("VIDIOC_S_TUNER: V4L2_TUNER_MODE_STEREO\n")); break; } + case V4L2_TUNER_MODE_LANG1_LANG2: { + mxb->cur_mode = V4L2_TUNER_MODE_LANG1_LANG2; + byte = TDA9840_SET_BOTH; + DEB_D(("VIDIOC_S_TUNER: V4L2_TUNER_MODE_LANG1_LANG2\n")); + break; + } case V4L2_TUNER_MODE_LANG1: { mxb->cur_mode = V4L2_TUNER_MODE_LANG1; byte = TDA9840_SET_LANG1;