diff options
author | Michael Krufky <mkrufky@linuxtv.org> | 2006-03-22 23:11:18 -0500 |
---|---|---|
committer | Michael Krufky <mkrufky@linuxtv.org> | 2006-03-22 23:11:18 -0500 |
commit | fa68fea7f2eebe68cf5570f36ee66bb0d0104a14 (patch) | |
tree | a09bec1e43d87d68293c30d1e71aefe9817150c3 /linux/drivers/media/dvb/dvb-usb | |
parent | 58bc29a24c23aa5f0bcaf23faab8845769247d30 (diff) | |
download | mediapointer-dvb-s2-fa68fea7f2eebe68cf5570f36ee66bb0d0104a14.tar.gz mediapointer-dvb-s2-fa68fea7f2eebe68cf5570f36ee66bb0d0104a14.tar.bz2 |
cxusb: fix i2c debug messages for bluebird devices
From: Michael Krufky <mkrufky@linuxtv.org>
Only the Medion boxes return 0x08 after an i2c read/write.
The bluebird devices do not return anything at all.
This patch conditionalizes the test for the 0x08 return code
to produce a warning message when using the Medion box, only.
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Diffstat (limited to 'linux/drivers/media/dvb/dvb-usb')
-rw-r--r-- | linux/drivers/media/dvb/dvb-usb/cxusb.c | 4 | ||||
-rw-r--r-- | linux/drivers/media/dvb/dvb-usb/cxusb.h | 2 |
2 files changed, 4 insertions, 2 deletions
diff --git a/linux/drivers/media/dvb/dvb-usb/cxusb.c b/linux/drivers/media/dvb/dvb-usb/cxusb.c index b5cba254a..f20b2bda4 100644 --- a/linux/drivers/media/dvb/dvb-usb/cxusb.c +++ b/linux/drivers/media/dvb/dvb-usb/cxusb.c @@ -109,7 +109,7 @@ static int cxusb_i2c_xfer(struct i2c_adapter *adap,struct i2c_msg msg[],int num) break; if (ibuf[0] != 0x08) - deb_info("i2c read may have failed\n"); + deb_i2c("i2c read may have failed\n"); memcpy(msg[i+1].buf,&ibuf[1],msg[i+1].len); @@ -123,7 +123,7 @@ static int cxusb_i2c_xfer(struct i2c_adapter *adap,struct i2c_msg msg[],int num) if (cxusb_ctrl_msg(d,CMD_I2C_WRITE, obuf, 2+msg[i].len, &ibuf,1) < 0) break; if (ibuf != 0x08) - deb_info("i2c write may have failed\n"); + deb_i2c("i2c write may have failed\n"); } } diff --git a/linux/drivers/media/dvb/dvb-usb/cxusb.h b/linux/drivers/media/dvb/dvb-usb/cxusb.h index 087c99427..c8ef77554 100644 --- a/linux/drivers/media/dvb/dvb-usb/cxusb.h +++ b/linux/drivers/media/dvb/dvb-usb/cxusb.h @@ -6,6 +6,8 @@ extern int dvb_usb_cxusb_debug; #define deb_info(args...) dprintk(dvb_usb_cxusb_debug,0x01,args) +#define deb_i2c(args...) if (d->udev->descriptor.idVendor == USB_VID_MEDION) \ + dprintk(dvb_usb_cxusb_debug,0x01,args) /* usb commands - some of it are guesses, don't have a reference yet */ #define CMD_I2C_WRITE 0x08 |