iio: imu: lsm6dsx: Fix mount matrix retrieval
authorAlejandro Tafalla <atafalla@dnyon.com>
Fri, 14 Jul 2023 15:31:26 +0000 (17:31 +0200)
committerJonathan Cameron <Jonathan.Cameron@huawei.com>
Sun, 23 Jul 2023 12:40:45 +0000 (13:40 +0100)
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>
drivers/iio/imu/st_lsm6dsx/st_lsm6dsx_core.c

index 6a18b363cf73ba5e547fa8a7b303494ceab3821d..b6e6b1df8a618995e23eeca4ad89f4776091bada 100644 (file)
@@ -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