]> Pileus Git - ~andy/linux/blobdiff - drivers/media/video/mt9v022.c
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wirel...
[~andy/linux] / drivers / media / video / mt9v022.c
index 690ee0d42eebbcbb8aaf7374ca49a7302716180f..944940758fa3094d6ec0d5213342fc533d97a240 100644 (file)
@@ -130,14 +130,13 @@ static struct mt9v022 *to_mt9v022(const struct i2c_client *client)
 
 static int reg_read(struct i2c_client *client, const u8 reg)
 {
-       s32 data = i2c_smbus_read_word_data(client, reg);
-       return data < 0 ? data : swab16(data);
+       return i2c_smbus_read_word_swapped(client, reg);
 }
 
 static int reg_write(struct i2c_client *client, const u8 reg,
                     const u16 data)
 {
-       return i2c_smbus_write_word_data(client, reg, swab16(data));
+       return i2c_smbus_write_word_swapped(client, reg, data);
 }
 
 static int reg_set(struct i2c_client *client, const u8 reg,