diff options
Diffstat (limited to 'drivers/media/dvb/dvb-usb')
-rw-r--r-- | drivers/media/dvb/dvb-usb/dibusb-common.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/drivers/media/dvb/dvb-usb/dibusb-common.c b/drivers/media/dvb/dvb-usb/dibusb-common.c index b395e852e47f..9143b5631e88 100644 --- a/drivers/media/dvb/dvb-usb/dibusb-common.c +++ b/drivers/media/dvb/dvb-usb/dibusb-common.c | |||
@@ -142,8 +142,13 @@ static int dibusb_i2c_xfer(struct i2c_adapter *adap,struct i2c_msg msg[],int num | |||
142 | } else if ((msg[i].flags & I2C_M_RD) == 0) { | 142 | } else if ((msg[i].flags & I2C_M_RD) == 0) { |
143 | if (dibusb_i2c_msg(d, msg[i].addr, msg[i].buf,msg[i].len,NULL,0) < 0) | 143 | if (dibusb_i2c_msg(d, msg[i].addr, msg[i].buf,msg[i].len,NULL,0) < 0) |
144 | break; | 144 | break; |
145 | } else | 145 | } else if (msg[i].addr != 0x50) { |
146 | break; | 146 | /* 0x50 is the address of the eeprom - we need to protect it |
147 | * from dibusb's bad i2c implementation: reads without | ||
148 | * writing the offset before are forbidden */ | ||
149 | if (dibusb_i2c_msg(d, msg[i].addr, NULL, 0, msg[i].buf, msg[i].len) < 0) | ||
150 | break; | ||
151 | } | ||
147 | } | 152 | } |
148 | 153 | ||
149 | mutex_unlock(&d->i2c_mutex); | 154 | mutex_unlock(&d->i2c_mutex); |