[media] it913x stop dual frontend attach in warm state with single devices
authorMalcolm Priestley <tvboxspy@gmail.com>
Sun, 11 Dec 2011 20:09:46 +0000 (17:09 -0300)
committerMauro Carvalho Chehab <mchehab@redhat.com>
Fri, 30 Dec 2011 19:22:36 +0000 (17:22 -0200)
Stop dual frontend attach in warm state with single devices.

Since this is a no reconnect device this occurs only after a warm system
reboot.

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
drivers/media/dvb/dvb-usb/it913x.c

index 627fb819122d5a1b6821fa0b3e7e99d1694612a3..ba3f11f6febb88d5482fbdcf76d4308fe98a1bd5 100644 (file)
@@ -473,9 +473,12 @@ static int it913x_identify_state(struct usb_device *udev,
        else
                props->adapter[0].fe[0].stream.u.bulk.buffersize =
                        TS_BUFFER_SIZE_PID;
-       if (it913x_config.dual_mode)
+       if (it913x_config.dual_mode) {
                props->adapter[1].fe[0].stream.u.bulk.buffersize =
                        props->adapter[0].fe[0].stream.u.bulk.buffersize;
+               props->num_adapters = 2;
+       } else
+               props->num_adapters = 1;
 
        ret = ite_firmware_select(udev, props);
 
@@ -499,10 +502,8 @@ static int it913x_identify_state(struct usb_device *udev,
                        if (ret != 0)
                                ret = it913x_wr_reg(udev, DEV_0,
                                        GPIOH1_O, 0x0);
-                       props->num_adapters = 2;
                }
-       } else
-               props->num_adapters = 1;
+       }
 
        reg = it913x_read_reg(udev, IO_MUX_POWER_CLK);