From 9921cb14f030c62b4dc4a1ab2af7151c211660e4 Mon Sep 17 00:00:00 2001 From: Guenter Roeck Date: Mon, 18 Mar 2013 03:46:12 -0700 Subject: [PATCH] hwmon: (adt7310) Fix sparse warning Fix: drivers/hwmon/adt7310.c:51:16: sparse: cast to restricted __be16 Cc: Lars-Peter Clausen Signed-off-by: Guenter Roeck --- drivers/hwmon/adt7310.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/hwmon/adt7310.c b/drivers/hwmon/adt7310.c index b70a481bca17..da5f0789fb97 100644 --- a/drivers/hwmon/adt7310.c +++ b/drivers/hwmon/adt7310.c @@ -48,7 +48,7 @@ static int adt7310_spi_read_word(struct device *dev, u8 reg) if (ret < 0) return ret; - return be16_to_cpu(ret); + return be16_to_cpu((__force __be16)ret); } static int adt7310_spi_write_word(struct device *dev, u8 reg, u16 data) -- 2.39.5