diff options
author | Lars-Peter Clausen <lars@metafoo.de> | 2013-09-27 10:34:28 -0400 |
---|---|---|
committer | Mark Brown <broonie@linaro.org> | 2013-10-03 08:52:15 -0400 |
commit | 600ba98bff438510dc81fc1ba9048420479bbded (patch) | |
tree | 06ea92e00fcbb222b8db0a5d6dafcccf4a55aa1f /drivers/hwmon/adt7310.c | |
parent | 05071aa864e84000759191438a4a9ff7ba2c360e (diff) |
hwmon: (adt7310) Use spi_w8r16be() instead spi_w8r16()
Using spi_w8r16be() instead of spi_w8r16() in this driver makes a code a bit
shorter and cleaner.
Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Acked-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Mark Brown <broonie@linaro.org>
Diffstat (limited to 'drivers/hwmon/adt7310.c')
-rw-r--r-- | drivers/hwmon/adt7310.c | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/drivers/hwmon/adt7310.c b/drivers/hwmon/adt7310.c index da5f0789fb97..5994cf68e0a4 100644 --- a/drivers/hwmon/adt7310.c +++ b/drivers/hwmon/adt7310.c | |||
@@ -42,13 +42,8 @@ static const u8 adt7310_reg_table[] = { | |||
42 | static int adt7310_spi_read_word(struct device *dev, u8 reg) | 42 | static int adt7310_spi_read_word(struct device *dev, u8 reg) |
43 | { | 43 | { |
44 | struct spi_device *spi = to_spi_device(dev); | 44 | struct spi_device *spi = to_spi_device(dev); |
45 | int ret; | ||
46 | 45 | ||
47 | ret = spi_w8r16(spi, AD7310_COMMAND(reg) | ADT7310_CMD_READ); | 46 | return spi_w8r16be(spi, AD7310_COMMAND(reg) | ADT7310_CMD_READ); |
48 | if (ret < 0) | ||
49 | return ret; | ||
50 | |||
51 | return be16_to_cpu((__force __be16)ret); | ||
52 | } | 47 | } |
53 | 48 | ||
54 | static int adt7310_spi_write_word(struct device *dev, u8 reg, u16 data) | 49 | static int adt7310_spi_write_word(struct device *dev, u8 reg, u16 data) |