summaryrefslogtreecommitdiff
path: root/drivers/media/rc/nuvoton-cir.c
diff options
context:
space:
mode:
authorHeiner Kallweit <hkallweit1@gmail.com>2016-07-07 09:17:39 +0300
committerMauro Carvalho Chehab <mchehab@s-opensource.com>2016-07-13 21:49:01 +0300
commit5cac1f67ea0363d463a58ec2d9118268fe2ba5d6 (patch)
treeb6e362ab3e220d3874bfeac452c270cfb1b7c579 /drivers/media/rc/nuvoton-cir.c
parentda677fe14364f7ac1f5f7085c58bbc2f7bb12da0 (diff)
downloadlinux-5cac1f67ea0363d463a58ec2d9118268fe2ba5d6.tar.xz
[media] rc: nuvoton: fix hang if chip is configured for alternative EFM IO address
If a system configures the Nuvoton chip to use the alternative EFM IO address (CR_EFIR2) then after probing the primary EFM IO address (CR_EFIR) this region is not released. If a driver for another function of the Nuvoton Super I/O chip uses the same probing mechanism then it will hang if loaded after the nuvoton-cir driver. This was reported for the nct6775 hwmon driver. Fix this by properly releasing the region after probing CR_EFIR. This regression was introduced with kernel 4.6 so cc it to stable. Reported-by: Antti Seppälä <a.seppala@gmail.com> Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com> Tested-by: Antti Seppälä <a.seppala@gmail.com> Cc: <stable@vger.kernel.org> # 4.6.x- Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Diffstat (limited to 'drivers/media/rc/nuvoton-cir.c')
-rw-r--r--drivers/media/rc/nuvoton-cir.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/media/rc/nuvoton-cir.c b/drivers/media/rc/nuvoton-cir.c
index 36abfc2800f0..00215f343819 100644
--- a/drivers/media/rc/nuvoton-cir.c
+++ b/drivers/media/rc/nuvoton-cir.c
@@ -393,6 +393,7 @@ static int nvt_hw_detect(struct nvt_dev *nvt)
/* Check if we're wired for the alternate EFER setup */
nvt->chip_major = nvt_cr_read(nvt, CR_CHIP_ID_HI);
if (nvt->chip_major == 0xff) {
+ nvt_efm_disable(nvt);
nvt->cr_efir = CR_EFIR2;
nvt->cr_efdr = CR_EFDR2;
nvt_efm_enable(nvt);