aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/rc
diff options
context:
space:
mode:
authorNicolas Kaiser <nikai@nikai.net>2010-11-19 15:42:40 -0500
committerMauro Carvalho Chehab <mchehab@redhat.com>2010-12-29 05:16:57 -0500
commit5df465df7bd9c352289ca63d4d9f78299be72c7d (patch)
tree5f4df5aacb907c38acc34265bff818b1caa84d5e /drivers/media/rc
parentecfc95eb7410c04c23f59b02931e8f8b3aa4a5b3 (diff)
[media] drivers/media: nuvoton: fix chip id probe v2
Make sure we have a matching chip id high and one or the other of the chip id low values. Print the values if the probe fails. Signed-off-by: Nicolas Kaiser <nikai@nikai.net> Acked-by: Jarod Wilson <jarod@redhat.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/rc')
-rw-r--r--drivers/media/rc/nuvoton-cir.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/drivers/media/rc/nuvoton-cir.c b/drivers/media/rc/nuvoton-cir.c
index 7fca6d1549ed..dd4caf8ef80b 100644
--- a/drivers/media/rc/nuvoton-cir.c
+++ b/drivers/media/rc/nuvoton-cir.c
@@ -248,9 +248,12 @@ static int nvt_hw_detect(struct nvt_dev *nvt)
248 chip_minor = nvt_cr_read(nvt, CR_CHIP_ID_LO); 248 chip_minor = nvt_cr_read(nvt, CR_CHIP_ID_LO);
249 nvt_dbg("%s: chip id: 0x%02x 0x%02x", chip_id, chip_major, chip_minor); 249 nvt_dbg("%s: chip id: 0x%02x 0x%02x", chip_id, chip_major, chip_minor);
250 250
251 if (chip_major != CHIP_ID_HIGH && 251 if (chip_major != CHIP_ID_HIGH ||
252 (chip_minor != CHIP_ID_LOW || chip_minor != CHIP_ID_LOW2)) 252 (chip_minor != CHIP_ID_LOW && chip_minor != CHIP_ID_LOW2)) {
253 nvt_pr(KERN_ERR, "%s: unsupported chip, id: 0x%02x 0x%02x",
254 chip_id, chip_major, chip_minor);
253 ret = -ENODEV; 255 ret = -ENODEV;
256 }
254 257
255 nvt_efm_disable(nvt); 258 nvt_efm_disable(nvt);
256 259