• Jean Delvare's avatar
    [PATCH] I2C: Don't handle kind errors that cannot happen · bd0c4341
    Jean Delvare authored
    A number of chip drivers in 2.6.4-mm1 try to handle an error case that
    cannot happen when setting the chip name. The following patch changes
    that.
    
    Affected drivers: adm1021, it87, lm75, lm78, lm85, w83627hf, w83781d.
    
    Note that in any case, the worst that could happen (but then again, it
    cannot happen) is that the chip name would be set to an empty string,
    which doesn't hurt much.
    
    The patch also cleans up a few things in it87, w83627hf and w83781d,
    which are tightly related to the rest of the changes and necessary for
    them to be safe.
    
    it87: There is only really one "kind" in this driver, so I removed all
    references to other kinds.
    
    w83627hf: The driver did not handle unknown chips.
    
    w83781d: The user shouldn't be allowed to force a kind that doesn't
    match the chip's bus type (I2C or ISA). The code was not meant to handle
    that case, although no check was done so far.
    
    Tested on my AS99127F, works as intended.
    bd0c4341
lm75.c 8.21 KB