Commit 600ba98b authored by Lars-Peter Clausen's avatar Lars-Peter Clausen Committed by Mark Brown

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: default avatarLars-Peter Clausen <lars@metafoo.de>
Acked-by: default avatarGuenter Roeck <linux@roeck-us.net>
Signed-off-by: default avatarMark Brown <broonie@linaro.org>
parent 05071aa8
......@@ -42,13 +42,8 @@ static const u8 adt7310_reg_table[] = {
static int adt7310_spi_read_word(struct device *dev, u8 reg)
{
struct spi_device *spi = to_spi_device(dev);
int ret;
ret = spi_w8r16(spi, AD7310_COMMAND(reg) | ADT7310_CMD_READ);
if (ret < 0)
return ret;
return be16_to_cpu((__force __be16)ret);
return spi_w8r16be(spi, AD7310_COMMAND(reg) | ADT7310_CMD_READ);
}
static int adt7310_spi_write_word(struct device *dev, u8 reg, u16 data)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment