summaryrefslogtreecommitdiff
path: root/drivers/mmc
diff options
context:
space:
mode:
authorStephan Gerhold <stephan@gerhold.net>2020-02-14 12:03:24 +0100
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2020-04-02 17:20:24 +0200
commitbc823df170e7d3a11bafcc4731eb3f60623df797 (patch)
tree155710fb57d98307698097db7d9c97900c70a76b /drivers/mmc
parent51d3d6778adf1e50a3a25fab44fc6bfd4e1459a1 (diff)
iio: magnetometer: ak8974: Fix negative raw values in sysfs
commit b500c086e4110829a308c23e83a7cdc65b26228a upstream. At the moment, reading from in_magn_*_raw in sysfs tends to return large values around 65000, even though the output of ak8974 is actually limited to ±32768. This happens because the value is never converted to the signed 16-bit integer variant. Add an explicit cast to s16 to fix this. Fixes: 7c94a8b2ee8c ("iio: magn: add a driver for AK8974") Signed-off-by: Stephan Gerhold <stephan@gerhold.net> Reviewed-by: Linus Waleij <linus.walleij@linaro.org> Cc: <Stable@vger.kernel.org> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/mmc')
0 files changed, 0 insertions, 0 deletions