diff options
author | Mauro Carvalho Chehab <mchehab@infradead.org> | 2008-04-23 16:27:27 -0400 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@infradead.org> | 2008-04-24 13:09:50 -0400 |
commit | 867e835f4db4eba6d49072382cc05fc210c4ed1c (patch) | |
tree | e156664e4906a25d11e100f9beb401747249f37e /drivers/media/video/tea5761.c | |
parent | a589b66546d3d81e28dd95d3463c9e9da3d68728 (diff) |
V4L/DVB (7728): tea5761: bugzilla #10462: tea5761 autodetection code were broken
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Diffstat (limited to 'drivers/media/video/tea5761.c')
-rw-r--r-- | drivers/media/video/tea5761.c | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/drivers/media/video/tea5761.c b/drivers/media/video/tea5761.c index bd5ad549c1df..b93cdef9ac73 100644 --- a/drivers/media/video/tea5761.c +++ b/drivers/media/video/tea5761.c | |||
@@ -247,14 +247,19 @@ int tea5761_autodetection(struct i2c_adapter* i2c_adap, u8 i2c_addr) | |||
247 | 247 | ||
248 | if (16 != (rc = tuner_i2c_xfer_recv(&i2c, buffer, 16))) { | 248 | if (16 != (rc = tuner_i2c_xfer_recv(&i2c, buffer, 16))) { |
249 | printk(KERN_WARNING "it is not a TEA5761. Received %i chars.\n", rc); | 249 | printk(KERN_WARNING "it is not a TEA5761. Received %i chars.\n", rc); |
250 | return EINVAL; | 250 | return -EINVAL; |
251 | } | 251 | } |
252 | 252 | ||
253 | if (!((buffer[13] != 0x2b) || (buffer[14] != 0x57) || (buffer[15] != 0x061))) { | 253 | if ((buffer[13] != 0x2b) || (buffer[14] != 0x57) || (buffer[15] != 0x061)) { |
254 | printk(KERN_WARNING "Manufacturer ID= 0x%02x, Chip ID = %02x%02x. It is not a TEA5761\n",buffer[13],buffer[14],buffer[15]); | 254 | printk(KERN_WARNING "Manufacturer ID= 0x%02x, Chip ID = %02x%02x." |
255 | return EINVAL; | 255 | " It is not a TEA5761\n", |
256 | buffer[13], buffer[14], buffer[15]); | ||
257 | return -EINVAL; | ||
256 | } | 258 | } |
257 | printk(KERN_WARNING "TEA5761 detected.\n"); | 259 | printk(KERN_WARNING "tea5761: TEA%02x%02x detected. " |
260 | "Manufacturer ID= 0x%02x\n", | ||
261 | buffer[14], buffer[15], buffer[13]); | ||
262 | |||
258 | return 0; | 263 | return 0; |
259 | } | 264 | } |
260 | 265 | ||