diff options
Diffstat (limited to 'drivers/media/dvb/b2c2/flexcop-eeprom.c')
-rw-r--r-- | drivers/media/dvb/b2c2/flexcop-eeprom.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/drivers/media/dvb/b2c2/flexcop-eeprom.c b/drivers/media/dvb/b2c2/flexcop-eeprom.c index bbcf070a178d..8a8ae8a3e6ba 100644 --- a/drivers/media/dvb/b2c2/flexcop-eeprom.c +++ b/drivers/media/dvb/b2c2/flexcop-eeprom.c | |||
@@ -114,15 +114,18 @@ static int flexcop_eeprom_request(struct flexcop_device *fc, flexcop_access_op_t | |||
114 | { | 114 | { |
115 | int i,ret = 0; | 115 | int i,ret = 0; |
116 | u8 chipaddr = 0x50 | ((addr >> 8) & 3); | 116 | u8 chipaddr = 0x50 | ((addr >> 8) & 3); |
117 | for (i = 0; i < retries; i++) | 117 | for (i = 0; i < retries; i++) { |
118 | if ((ret = fc->i2c_request(fc,op,FC_I2C_PORT_EEPROM,chipaddr,addr & 0xff,buf,len)) == 0) | 118 | ret = fc->i2c_request(&fc->fc_i2c_adap[1], op, chipaddr, |
119 | addr & 0xff, buf, len); | ||
120 | if (ret == 0) | ||
119 | break; | 121 | break; |
122 | } | ||
120 | return ret; | 123 | return ret; |
121 | } | 124 | } |
122 | 125 | ||
123 | static int flexcop_eeprom_lrc_read(struct flexcop_device *fc, u16 addr, u8 *buf, u16 len, int retries) | 126 | static int flexcop_eeprom_lrc_read(struct flexcop_device *fc, u16 addr, u8 *buf, u16 len, int retries) |
124 | { | 127 | { |
125 | int ret = flexcop_eeprom_request(fc,FC_READ,addr,buf,len,retries); | 128 | int ret = flexcop_eeprom_request(fc, FC_READ, addr, buf, len, retries); |
126 | if (ret == 0) | 129 | if (ret == 0) |
127 | if (calc_lrc(buf, len - 1) != buf[len - 1]) | 130 | if (calc_lrc(buf, len - 1) != buf[len - 1]) |
128 | ret = -EINVAL; | 131 | ret = -EINVAL; |