The patch number 10322 was added via Mauro Carvalho Chehab <mche...@redhat.com>
to http://linuxtv.org/hg/v4l-dvb master development tree.

Kernel patches in this development tree may be modified to be backward
compatible with older kernels. Compatibility modifications will be
removed before inclusion into the mainstream Kernel

If anyone has any objections, please let us know by sending a message to:
        Linux Media Mailing List <linux-me...@vger.kernel.org>

------

From: Mauro Carvalho Chehab  <mche...@redhat.com>
merge: http://linuxtv.org/hg/~dheitmueller/dib0700-pbfixes/


Priority: normal

Signed-off-by: Mauro Carvalho Chehab <mche...@redhat.com>


---

 linux/drivers/media/dvb/dvb-usb/dib0700_core.c    |    3 
 linux/drivers/media/dvb/dvb-usb/dib0700_devices.c |   43 +++++++++++---
 2 files changed, 37 insertions(+), 9 deletions(-)

diff -r d87cf08379e0 -r bb3adf352e10 
linux/drivers/media/dvb/dvb-usb/dib0700_core.c
--- a/linux/drivers/media/dvb/dvb-usb/dib0700_core.c    Tue Jan 27 22:35:28 
2009 -0200
+++ b/linux/drivers/media/dvb/dvb-usb/dib0700_core.c    Tue Jan 27 22:38:07 
2009 -0200
@@ -211,7 +211,8 @@ static int dib0700_i2c_xfer_legacy(struc
 
                        /* special thing in the current firmware: when length 
is zero the read-failed */
                        if ((len = dib0700_ctrl_rd(d, buf, msg[i].len + 2, 
msg[i+1].buf, msg[i+1].len)) <= 0) {
-                               deb_info("I2C read failed on address %x\n", 
msg[i].addr);
+                               deb_info("I2C read failed on address 0x%02x\n",
+                                        msg[i].addr);
                                break;
                        }
 
diff -r d87cf08379e0 -r bb3adf352e10 
linux/drivers/media/dvb/dvb-usb/dib0700_devices.c
--- a/linux/drivers/media/dvb/dvb-usb/dib0700_devices.c Tue Jan 27 22:35:28 
2009 -0200
+++ b/linux/drivers/media/dvb/dvb-usb/dib0700_devices.c Tue Jan 27 22:38:07 
2009 -0200
@@ -262,7 +262,12 @@ static int stk7700P2_frontend_attach(str
                msleep(10);
                dib0700_set_gpio(adap->dev, GPIO10, GPIO_OUT, 1);
                msleep(10);
-               
dib7000p_i2c_enumeration(&adap->dev->i2c_adap,1,18,stk7700d_dib7000p_mt2266_config);
+               if (dib7000p_i2c_enumeration(&adap->dev->i2c_adap, 1, 18,
+                                            stk7700d_dib7000p_mt2266_config)
+                   != 0) {
+                       err("%s: dib7000p_i2c_enumeration failed.  Cannot 
continue\n", __func__);
+                       return -ENODEV;
+               }
        }
 
        adap->fe = dvb_attach(dib7000p_attach, 
&adap->dev->i2c_adap,0x80+(adap->id << 1),
@@ -284,7 +289,12 @@ static int stk7700d_frontend_attach(stru
                dib0700_set_gpio(adap->dev, GPIO10, GPIO_OUT, 1);
                msleep(10);
                dib0700_set_gpio(adap->dev, GPIO0, GPIO_OUT, 1);
-               
dib7000p_i2c_enumeration(&adap->dev->i2c_adap,2,18,stk7700d_dib7000p_mt2266_config);
+               if (dib7000p_i2c_enumeration(&adap->dev->i2c_adap, 2, 18,
+                                            stk7700d_dib7000p_mt2266_config)
+                   != 0) {
+                       err("%s: dib7000p_i2c_enumeration failed.  Cannot 
continue\n", __func__);
+                       return -ENODEV;
+               }
        }
 
        adap->fe = dvb_attach(dib7000p_attach, 
&adap->dev->i2c_adap,0x80+(adap->id << 1),
@@ -421,8 +431,12 @@ static int stk7700ph_frontend_attach(str
        dib0700_set_gpio(adap->dev, GPIO0, GPIO_OUT, 1);
        msleep(10);
 
-       dib7000p_i2c_enumeration(&adap->dev->i2c_adap, 1, 18,
-               &stk7700ph_dib7700_xc3028_config);
+       if (dib7000p_i2c_enumeration(&adap->dev->i2c_adap, 1, 18,
+                                    &stk7700ph_dib7700_xc3028_config) != 0) {
+               err("%s: dib7000p_i2c_enumeration failed.  Cannot continue\n",
+                   __func__);
+               return -ENODEV;
+       }
 
        adap->fe = dvb_attach(dib7000p_attach, &adap->dev->i2c_adap, 0x80,
                &stk7700ph_dib7700_xc3028_config);
@@ -1187,8 +1201,12 @@ static int stk7070p_frontend_attach(stru
        msleep(10);
        dib0700_set_gpio(adap->dev, GPIO0, GPIO_OUT, 1);
 
-       dib7000p_i2c_enumeration(&adap->dev->i2c_adap, 1, 18,
-               &dib7070p_dib7000p_config);
+       if (dib7000p_i2c_enumeration(&adap->dev->i2c_adap, 1, 18,
+                                    &dib7070p_dib7000p_config) != 0) {
+               err("%s: dib7000p_i2c_enumeration failed.  Cannot continue\n",
+                   __func__);
+               return -ENODEV;
+       }
 
        adap->fe = dvb_attach(dib7000p_attach, &adap->dev->i2c_adap, 0x80,
                &dib7070p_dib7000p_config);
@@ -1244,7 +1262,12 @@ static int stk7070pd_frontend_attach0(st
        msleep(10);
        dib0700_set_gpio(adap->dev, GPIO0, GPIO_OUT, 1);
 
-       dib7000p_i2c_enumeration(&adap->dev->i2c_adap, 2, 18, 
stk7070pd_dib7000p_config);
+       if (dib7000p_i2c_enumeration(&adap->dev->i2c_adap, 2, 18,
+                                    stk7070pd_dib7000p_config) != 0) {
+               err("%s: dib7000p_i2c_enumeration failed.  Cannot continue\n",
+                   __func__);
+               return -ENODEV;
+       }
 
        adap->fe = dvb_attach(dib7000p_attach, &adap->dev->i2c_adap, 0x80, 
&stk7070pd_dib7000p_config[0]);
        return adap->fe == NULL ? -ENODEV : 0;
@@ -1683,7 +1706,11 @@ struct dvb_usb_device_properties dib0700
                                { &dib0700_usb_id_table[43], NULL },
                                { NULL },
                        }
-               }
+               },
+               .rc_interval      = DEFAULT_RC_INTERVAL,
+               .rc_key_map       = dib0700_rc_keys,
+               .rc_key_map_size  = ARRAY_SIZE(dib0700_rc_keys),
+               .rc_query         = dib0700_rc_query
        }, { DIB0700_DEFAULT_DEVICE_PROPERTIES,
 
                .num_adapters = 1,


---

Patch is available at: 
http://linuxtv.org/hg/v4l-dvb/rev/bb3adf352e10c930ce186b7b70958f0cd2bc1dba

_______________________________________________
linuxtv-commits mailing list
linuxtv-commits@linuxtv.org
http://www.linuxtv.org/cgi-bin/mailman/listinfo/linuxtv-commits

Reply via email to