From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail.linuxfoundation.org ([140.211.169.12]:44602 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751065AbeC0IaC (ORCPT ); Tue, 27 Mar 2018 04:30:02 -0400 Subject: Patch "iio: imu: st_lsm6dsx: fix endianness in st_lsm6dsx_read_oneshot()" has been added to the 4.14-stable tree To: lorenzo.bianconi@redhat.com, Jonathan.Cameron@huawei.com, gregkh@linuxfoundation.org Cc: , From: Date: Tue, 27 Mar 2018 10:29:55 +0200 Message-ID: <1522139395231167@kroah.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ANSI_X3.4-1968 Content-Transfer-Encoding: 8bit Sender: stable-owner@vger.kernel.org List-ID: This is a note to let you know that I've just added the patch titled iio: imu: st_lsm6dsx: fix endianness in st_lsm6dsx_read_oneshot() to the 4.14-stable tree which can be found at: http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary The filename of the patch is: iio-imu-st_lsm6dsx-fix-endianness-in-st_lsm6dsx_read_oneshot.patch and it can be found in the queue-4.14 subdirectory. If you, or anyone else, feels it should not be added to the stable tree, please let know about it. >>From 7b9ebe428266fb7e0a6d769bb3ff3fcb6044b15e Mon Sep 17 00:00:00 2001 From: Lorenzo Bianconi Date: Mon, 1 Jan 2018 19:54:42 +0100 Subject: iio: imu: st_lsm6dsx: fix endianness in st_lsm6dsx_read_oneshot() From: Lorenzo Bianconi commit 7b9ebe428266fb7e0a6d769bb3ff3fcb6044b15e upstream. Apply le16_to_cpu() to data read from the sensor in order to take into account architecture endianness Fixes: 290a6ce11d93 (iio: imu: add support to lsm6dsx driver) Signed-off-by: Lorenzo Bianconi Signed-off-by: Jonathan Cameron Signed-off-by: Greg Kroah-Hartman --- drivers/iio/imu/st_lsm6dsx/st_lsm6dsx_core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/drivers/iio/imu/st_lsm6dsx/st_lsm6dsx_core.c +++ b/drivers/iio/imu/st_lsm6dsx/st_lsm6dsx_core.c @@ -392,7 +392,7 @@ static int st_lsm6dsx_read_oneshot(struc st_lsm6dsx_sensor_disable(sensor); - *val = (s16)data; + *val = (s16)le16_to_cpu(data); return IIO_VAL_INT; } Patches currently in stable-queue which might be from lorenzo.bianconi@redhat.com are queue-4.14/iio-imu-st_lsm6dsx-fix-endianness-in-st_lsm6dsx_read_oneshot.patch