aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/hwmon/gl520sm.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/hwmon/gl520sm.c')
-rw-r--r--drivers/hwmon/gl520sm.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/hwmon/gl520sm.c b/drivers/hwmon/gl520sm.c
index 131ea8625f0..cd6085bbfba 100644
--- a/drivers/hwmon/gl520sm.c
+++ b/drivers/hwmon/gl520sm.c
@@ -821,7 +821,7 @@ static int gl520_remove(struct i2c_client *client)
821static int gl520_read_value(struct i2c_client *client, u8 reg) 821static int gl520_read_value(struct i2c_client *client, u8 reg)
822{ 822{
823 if ((reg >= 0x07) && (reg <= 0x0c)) 823 if ((reg >= 0x07) && (reg <= 0x0c))
824 return swab16(i2c_smbus_read_word_data(client, reg)); 824 return i2c_smbus_read_word_swapped(client, reg);
825 else 825 else
826 return i2c_smbus_read_byte_data(client, reg); 826 return i2c_smbus_read_byte_data(client, reg);
827} 827}
@@ -829,7 +829,7 @@ static int gl520_read_value(struct i2c_client *client, u8 reg)
829static int gl520_write_value(struct i2c_client *client, u8 reg, u16 value) 829static int gl520_write_value(struct i2c_client *client, u8 reg, u16 value)
830{ 830{
831 if ((reg >= 0x07) && (reg <= 0x0c)) 831 if ((reg >= 0x07) && (reg <= 0x0c))
832 return i2c_smbus_write_word_data(client, reg, swab16(value)); 832 return i2c_smbus_write_word_swapped(client, reg, value);
833 else 833 else
834 return i2c_smbus_write_byte_data(client, reg, value); 834 return i2c_smbus_write_byte_data(client, reg, value);
835} 835}