lkml.org 
[lkml]   [2003]   [Oct]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    SubjectRe: [PATCH] More i2c driver fixes for 2.6.0-test7
    From
    Date
    ChangeSet 1.1347.1.2, 2003/10/13 12:31:27-07:00, kronos@kronoz.cjb.net

    [PATCH] I2C: sensors/w83781d.c creates useless sysfs entries

    Jindrich Makovicka <makovick@kmlinux.fjfi.cvut.cz> ha scritto:
    > here is a trivial fix for Winbond sensor driver, which currently creates
    > useless entries in sys/bus/i2c due to missing braces after if statements
    > - author probably forgot about the macro expansion.

    IMHO it's better to fix the macro:


    drivers/i2c/chips/w83781d.c | 4 +++-
    1 files changed, 3 insertions(+), 1 deletion(-)


    diff -Nru a/drivers/i2c/chips/w83781d.c b/drivers/i2c/chips/w83781d.c
    --- a/drivers/i2c/chips/w83781d.c Wed Oct 15 10:57:59 2003
    +++ b/drivers/i2c/chips/w83781d.c Wed Oct 15 10:57:59 2003
    @@ -422,9 +422,11 @@
    sysfs_in_offsets(8);

    #define device_create_file_in(client, offset) \
    +do { \
    device_create_file(&client->dev, &dev_attr_in_input##offset); \
    device_create_file(&client->dev, &dev_attr_in_min##offset); \
    -device_create_file(&client->dev, &dev_attr_in_max##offset);
    +device_create_file(&client->dev, &dev_attr_in_max##offset); \
    +} while (0);

    #define show_fan_reg(reg) \
    static ssize_t show_##reg (struct device *dev, char *buf, int nr) \
    -
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.kernel.org
    More majordomo info at http://vger.kernel.org/majordomo-info.html
    Please read the FAQ at http://www.tux.org/lkml/

    \
     
     \ /
      Last update: 2005-03-22 13:49    [W:0.019 / U:30.572 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site