[media] nuvoton-cir: fix setting ioport base address
authorHeiner Kallweit <hkallweit1@gmail.com>
Wed, 30 Dec 2015 16:42:05 +0000 (14:42 -0200)
committerMauro Carvalho Chehab <mchehab@osg.samsung.com>
Mon, 25 Jan 2016 17:45:42 +0000 (15:45 -0200)
commitfb16aaf58cbe902585fc3a2ce40d74a2de384ac2
treeca0609a62217604ed572d5fcdd68882db6ff9096
parentd790c9b93b0c37a23680c88b63be0e34744f764e
[media] nuvoton-cir: fix setting ioport base address

At least on Zotac CI321 ACPI provides an ioport range for the wake up part
but accessing these ioports has no effect.
Instead the ioport base address is set to another value already
(0xa20 in my case) and accessing this ioport range works.

Therefore set a new ioport base address only if the current ioport base
address is 0 (register reset default).

The need to use the existing base address instead of trying to set
an own one doesn't seem to be limited to this specific device as other
drivers like hwmon/nct6775 do it the same way.

This change was successfully tested on the mentioned device.
And the change should be generic enough to not break the driver for
other chips (however due to lack of appropriate hardware I wasn't
able to test this).

[mchehab@osg.samsung.com: Tested on Intel NUC NUC5i7RYB with BIOS
 version RYBDWi35.86A.0350.2015.0812.1722]

Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com>
Tested-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
drivers/media/rc/nuvoton-cir.c
This page took 0.029299 seconds and 5 git commands to generate.