From: Lars-Peter Clausen Date: Fri, 27 Sep 2013 14:34:28 +0000 (+0200) Subject: hwmon: (adt7310) Use spi_w8r16be() instead spi_w8r16() X-Git-Tag: firefly_0821_release~176^2~5010^2^2~1 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=600ba98bff438510dc81fc1ba9048420479bbded;p=firefly-linux-kernel-4.4.55.git 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 Acked-by: Guenter Roeck Signed-off-by: Mark Brown --- 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[] = { 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)