public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH v3] iio: imu: lsm6dsx: Fix mount matrix retrieval
@ 2023-07-14 15:31 Alejandro Tafalla
  2023-07-15 17:35 ` Jonathan Cameron
  0 siblings, 1 reply; 6+ messages in thread
From: Alejandro Tafalla @ 2023-07-14 15:31 UTC (permalink / raw)
  To: Lorenzo Bianconi, Jonathan Cameron, Lars-Peter Clausen
  Cc: Alejandro Tafalla, Jonathan Cameron, linux-iio, linux-kernel

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>
---
Changes in v3:
- Removed unneeded check for err == -EOPNOTSUPP.

Changes in v2:
- Use of error codes instead of true/false

 drivers/iio/imu/st_lsm6dsx/st_lsm6dsx_core.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

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 @@ static int lsm6dsx_get_acpi_mount_matrix(struct device *dev,
 static int lsm6dsx_get_acpi_mount_matrix(struct device *dev,
 					  struct iio_mount_matrix *orientation)
 {
-	return false;
+	return -EOPNOTSUPP;
 }
 
 #endif
-- 
2.41.0


^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2023-07-23 12:50 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-07-14 15:31 [PATCH v3] iio: imu: lsm6dsx: Fix mount matrix retrieval Alejandro Tafalla
2023-07-15 17:35 ` Jonathan Cameron
2023-07-17 21:17   ` Alejandro Tafalla
2023-07-20 18:40     ` Jonathan Cameron
2023-07-20 21:27       ` Lorenzo Bianconi
2023-07-23 12:50         ` Jonathan Cameron

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox