]> Pileus Git - ~andy/linux/blobdiff - drivers/hwmon/gl518sm.c
hwmon: (max1111) Change sysfs interface to in[0-3]_input in millivolts
[~andy/linux] / drivers / hwmon / gl518sm.c
index e7ae5743e1817c382c6ab8e56c415d3dea5ab19a..a13e2da97e3099957b157fc088e8f62dad2327c0 100644 (file)
@@ -591,7 +591,7 @@ static int gl518_remove(struct i2c_client *client)
 static int gl518_read_value(struct i2c_client *client, u8 reg)
 {
        if ((reg >= 0x07) && (reg <= 0x0c))
-               return swab16(i2c_smbus_read_word_data(client, reg));
+               return i2c_smbus_read_word_swapped(client, reg);
        else
                return i2c_smbus_read_byte_data(client, reg);
 }
@@ -599,7 +599,7 @@ static int gl518_read_value(struct i2c_client *client, u8 reg)
 static int gl518_write_value(struct i2c_client *client, u8 reg, u16 value)
 {
        if ((reg >= 0x07) && (reg <= 0x0c))
-               return i2c_smbus_write_word_data(client, reg, swab16(value));
+               return i2c_smbus_write_word_swapped(client, reg, value);
        else
                return i2c_smbus_write_byte_data(client, reg, value);
 }