fintek-cir: add support for newer chip version
Subsystems (3)
Hi Mauro,
The patch 83ec8225b6ae: "[media] fintek-cir: add support for newer chip version" from Feb 14, 2012, leads to the following warning:drivers/media/rc/fintek-cir.c:200 fintek_hw_detect()
warn: known condition '1032 != 2052'
drivers/media/rc/fintek-cir.c
197 /*
198 * Newer reviews of this chipset uses port 8 instead of 5
199 */
200 if ((chip != 0x0408) || (chip != 0x0804))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
One of these conditions is always true.
Probably it should it be:
if ((chip == 0x0408) || (chip == 0x0804)) or: if ((chip != 0x0408) && (chip != 0x0804))
depending one if those are the newer or the older chipsets. I googled for it a bit and then decided to just email you. :P
201 fintek->logical_dev_cir = LOGICAL_DEV_CIR_REV2; 202 else 203 fintek->logical_dev_cir = LOGICAL_DEV_CIR_REV1; 204
regards,
dan carpenter
Quoted 12 lines · Dan Carpenter
Hi Mauro,
The patch
83ec8225b6ae: "[media] fintek-cir: add support for newer chip version" from Feb 14, 2012, leads to the following warning:drivers/media/rc/fintek-cir.c:200fintek_hw_detect()warn: known condition '1032 != 2052'
drivers/media/rc/fintek-cir.c
197 /*
198 * Newer reviews of this chipset uses port 8 instead of 5
199 */
200 if ((chip !=0x0408) || (chip !=0x0804))
Quoted 7 lines
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^One of these conditions is always true.
Probably it should it be:
if ((chip == 0x0408) || (chip == 0x0804)) or: if ((chip != 0x0408) && (chip != 0x0804))
Reasonably sure the latter case would be the proper one there.
Quoted 11 lines
depending one if those are the newer or the older chipsets. I googled for it a bit and then decided to just email you. :P
201 fintek->logical_dev_cir = LOGICAL_DEV_CIR_REV2; 202 else 203 fintek->logical_dev_cir = LOGICAL_DEV_CIR_REV1; 204regards,
dan carpenter
Signature · 2 lines
Jarod Wilson [email protected]
Em 19-04-2012 17:41, Jarod Wilson escreveu:
Quoted 16 lines · Dan Carpenter
Quoted 15 lines
Hi Mauro,
The patch
83ec8225b6ae: "[media] fintek-cir: add support for newer chip version" from Feb 14, 2012, leads to the following warning:drivers/media/rc/fintek-cir.c:200fintek_hw_detect()warn: known condition '1032 != 2052'
drivers/media/rc/fintek-cir.c
197 /*
198 * Newer reviews of this chipset uses port 8 instead of 5
199 */
200 if ((chip !=0x0408) || (chip !=0x0804))^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^One of these conditions is always true.
Quoted 6 lines
Quoted 4 lines
Probably it should it be:
if ((chip == 0x0408) || (chip == 0x0804)) or: if ((chip != 0x0408) && (chip != 0x0804))Reasonably sure the latter case would be the proper one there.
Yes. The information that I have is that Fintek product 0x0408(F71809) and 0x0804(F71855) use logical device 5 and other chip ids use logical device 8.
Quoted 5 lines
Quoted 5 lines
depending one if those are the newer or the older chipsets. I googled for it a bit and then decided to just email you. :P
Quoted 9 lines
Quoted 8 lines
201 fintek->logical_dev_cir = LOGICAL_DEV_CIR_REV2; 202 else 203 fintek->logical_dev_cir = LOGICAL_DEV_CIR_REV1; 204regards,
dan carpenter
Care to prepare us a patch in order to fix it?
Thank you!
Mauro
PATCH 1/1 fintek-cir: change || to &&
The current condition is always true, so everything uses LOGICAL_DEV_CIR_REV2 (8). It should be that Fintek products 0x0408(F71809) and 0x0804(F71855) use logical device LOGICAL_DEV_CIR_REV1 (5) and other chip ids use logical device 8.
In other words, this fixes hardware detection for 0x0408 and 0x0804.
drivers/media/rc/fintek-cir.c +1 -1
@@ -197,7 +197,7 @@ static int fintek_hw_detect(struct fintek_dev *fintek)/* * Newer reviews of this chipset uses port 8 instead of 5 */ -if ((chip !=0x0408 ) || (chip !=0x0804 )) +if ((chip !=0x0408 ) && (chip !=0x0804 )) fintek->logical_dev_cir =LOGICAL_DEV_CIR_REV2 ;else fintek->logical_dev_cir =LOGICAL_DEV_CIR_REV1 ;
Re: [patch] [media] fintek-cir: change || to &&
Quoted 8 lines · Dan Carpenter
The current condition is always true, so everything uses
LOGICAL_DEV_CIR_REV2(8). It should be that Fintek products 0x0408(F71809) and 0x0804(F71855) use logical deviceLOGICAL_DEV_CIR_REV1(5) and other chip ids use logical device 8.In other words, this fixes hardware detection for
0x0408and0x0804.Signed-off-by Dan Carpenter <[email protected]>
Signature · 2 lines
Jarod Wilson [email protected]