Skip to content

Commit

Permalink
hwmon: (adt7310) Use spi_w8r16be() instead spi_w8r16()
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Lars-Peter Clausen authored and Mark Brown committed Oct 3, 2013
1 parent 05071aa commit 600ba98
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions drivers/hwmon/adt7310.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 600ba98

Please sign in to comment.