summaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorAlejandro Tafalla <atafalla@dnyon.com>2023-07-14 17:31:26 +0200
committerJonathan Cameron <Jonathan.Cameron@huawei.com>2023-07-23 13:40:45 +0100
commit6811694eb2f6b7a4e97be2029edc7dd6a39460f8 (patch)
tree1da03f3bdb1489b16a73ee8d8e97d61b84a581e4 /drivers
parent09738ccbc4148c62d6c8c4644ff4a099d57f49ad (diff)
downloadlinux-stable-6811694eb2f6b7a4e97be2029edc7dd6a39460f8.tar.gz
linux-stable-6811694eb2f6b7a4e97be2029edc7dd6a39460f8.tar.bz2
linux-stable-6811694eb2f6b7a4e97be2029edc7dd6a39460f8.zip
iio: imu: lsm6dsx: Fix mount matrix retrieval
The function lsm6dsx_get_acpi_mount_matrix should return an error when ACPI support is not enabled to allow executing iio_read_mount_matrix in the probe function. Fixes: dc3d25f22b88 ("iio: imu: lsm6dsx: Add ACPI mount matrix retrieval") Signed-off-by: Alejandro Tafalla <atafalla@dnyon.com> Acked-by: Lorenzo Bianconi <lorenzo@kernel.org> Link: https://lore.kernel.org/r/20230714153132.27265-1-atafalla@dnyon.com Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/iio/imu/st_lsm6dsx/st_lsm6dsx_core.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/iio/imu/st_lsm6dsx/st_lsm6dsx_core.c b/drivers/iio/imu/st_lsm6dsx/st_lsm6dsx_core.c
index 6a18b363cf73..b6e6b1df8a61 100644
--- a/drivers/iio/imu/st_lsm6dsx/st_lsm6dsx_core.c
+++ b/drivers/iio/imu/st_lsm6dsx/st_lsm6dsx_core.c
@@ -2687,7 +2687,7 @@ unknown_format:
static int lsm6dsx_get_acpi_mount_matrix(struct device *dev,
struct iio_mount_matrix *orientation)
{
- return false;
+ return -EOPNOTSUPP;
}
#endif