]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/commitdiff
hwmon: fix lm78 detection regression
authorHans de Goede <j.w.r.degoede@hhs.nl>
Tue, 24 Jul 2007 21:36:00 +0000 (23:36 +0200)
committerMark M. Hoffman <mhoffman@lightlink.com>
Tue, 31 Jul 2007 01:05:07 +0000 (21:05 -0400)
Here is a small but important bugfix to the lm78 driver. I found out about this
problem because a Fedora user filed a bug that the lm78 driver no longer worked
on his system: https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=249428

The problem is that sometime ago the isa lm78 detection was made more stringent
and this new code now checks the chip-id, but does not accept a chip-id of 20h,
however a chip-id of 20h is valid, and is excepted in the main probe function
of the driver, see line 551. This fixed also makes the isa detection code
accept the chip-id of 0x20 fixing this issue.

Signed-off-by: Hans de Goede <j.w.r.degoede@hhs.nl>
Signed-off-by: Mark M. Hoffman <mhoffman@lightlink.com>
drivers/hwmon/lm78.c

index 9fb572f03ba5bf707cd8768a7c1f60928c444821..565c4e679b8d4f1ebcf1cb04cc1faecd71fb31d9 100644 (file)
@@ -864,7 +864,7 @@ static int __init lm78_isa_found(unsigned short address)
        /* Determine the chip type */
        outb_p(LM78_REG_CHIPID, address + LM78_ADDR_REG_OFFSET);
        val = inb_p(address + LM78_DATA_REG_OFFSET);
-       if (val == 0x00                 /* LM78 */
+       if (val == 0x00 || val == 0x20  /* LM78 */
         || val == 0x40                 /* LM78-J */
         || (val & 0xfe) == 0xc0)       /* LM79 */
                found = 1;