diff options
Diffstat (limited to 'drivers/media/video/mt9t031.c')
-rw-r--r-- | drivers/media/video/mt9t031.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/drivers/media/video/mt9t031.c b/drivers/media/video/mt9t031.c index 0e78477452ff..84add1aef139 100644 --- a/drivers/media/video/mt9t031.c +++ b/drivers/media/video/mt9t031.c | |||
@@ -90,14 +90,13 @@ static struct mt9t031 *to_mt9t031(const struct i2c_client *client) | |||
90 | 90 | ||
91 | static int reg_read(struct i2c_client *client, const u8 reg) | 91 | static int reg_read(struct i2c_client *client, const u8 reg) |
92 | { | 92 | { |
93 | s32 data = i2c_smbus_read_word_data(client, reg); | 93 | return i2c_smbus_read_word_swapped(client, reg); |
94 | return data < 0 ? data : swab16(data); | ||
95 | } | 94 | } |
96 | 95 | ||
97 | static int reg_write(struct i2c_client *client, const u8 reg, | 96 | static int reg_write(struct i2c_client *client, const u8 reg, |
98 | const u16 data) | 97 | const u16 data) |
99 | { | 98 | { |
100 | return i2c_smbus_write_word_data(client, reg, swab16(data)); | 99 | return i2c_smbus_write_word_swapped(client, reg, data); |
101 | } | 100 | } |
102 | 101 | ||
103 | static int reg_set(struct i2c_client *client, const u8 reg, | 102 | static int reg_set(struct i2c_client *client, const u8 reg, |