V4L/DVB (6932): cx23885: add missing subsystem ID for Hauppauge HVR1800 Retail
[safe/jmp/linux-2.6] / drivers / media / video / mxb.c
index 14ca251..98ad309 100644 (file)
@@ -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,8 +195,7 @@ 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);
+       list_for_each_entry(client, &mxb->i2c_adapter.clients, list) {
                if( I2C_ADDR_TEA6420_1 == client->addr )
                        mxb->tea6420_1 = client;
                if( I2C_ADDR_TEA6420_2 == client->addr )
@@ -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;