Skip to content

Commit

Permalink
hwmon: (adt7310) Fix sparse warning
Browse files Browse the repository at this point in the history
Fix: drivers/hwmon/adt7310.c:51:16: sparse: cast to restricted __be16

Cc: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
  • Loading branch information
Guenter Roeck committed Apr 8, 2013
1 parent fd9175d commit 71bb2d2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/hwmon/adt7310.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 71bb2d2

Please sign in to comment.