diff options
Diffstat (limited to 'drivers/media')
-rw-r--r-- | drivers/media/dvb/b2c2/flexcop-i2c.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/drivers/media/dvb/b2c2/flexcop-i2c.c b/drivers/media/dvb/b2c2/flexcop-i2c.c index 02a0ea6e1c17..6bf858a436c9 100644 --- a/drivers/media/dvb/b2c2/flexcop-i2c.c +++ b/drivers/media/dvb/b2c2/flexcop-i2c.c | |||
@@ -135,6 +135,13 @@ static int flexcop_master_xfer(struct i2c_adapter *i2c_adap, struct i2c_msg msgs | |||
135 | struct flexcop_device *fc = i2c_get_adapdata(i2c_adap); | 135 | struct flexcop_device *fc = i2c_get_adapdata(i2c_adap); |
136 | int i, ret = 0; | 136 | int i, ret = 0; |
137 | 137 | ||
138 | /* Some drivers use 1 byte or 0 byte reads as probes, which this | ||
139 | * driver doesn't support. These probes will always fail, so this | ||
140 | * hack makes them always succeed. If one knew how, it would of | ||
141 | * course be better to actually do the read. */ | ||
142 | if (num == 1 && msgs[0].flags == I2C_M_RD && msgs[0].len <= 1) | ||
143 | return 1; | ||
144 | |||
138 | if (mutex_lock_interruptible(&fc->i2c_mutex)) | 145 | if (mutex_lock_interruptible(&fc->i2c_mutex)) |
139 | return -ERESTARTSYS; | 146 | return -ERESTARTSYS; |
140 | 147 | ||