Skip to contentSkip to conversation

iio:accel:bma180: Fix the shared by parameter for an enum

PATCH In review Jonathan Cameron 2 participants 2 messages Jul 7, 2020 – Jul 8, 2020 IIO

lore
Share & tools
lore

Jonathan Cameron

author maintainer
#0 lore raw

PATCH 1/1 iio:accel:bma180: Fix the shared by parameter for an enum

From: Jonathan Cameron <[email protected]>

This takes an enum, not a boolean. Discovered via warning when doing a W=1 build.

Fixes fdadbce0da4 ("iio: add Bosch BMA180 acceleration sensor driver")
---
 drivers/iio/accel/bma180.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/iio/accel/bma180.c +1 -1
index 5b7a467c7b27..3246a5ef7360 100644
@@ -673,7 +673,7 @@ static const struct iio_chan_spec_ext_info bma023_ext_info[] = {
 };
 
 static const struct iio_chan_spec_ext_info bma180_ext_info[] = {
-	IIO_ENUM("power_mode", true, &bma180_power_mode_enum),
+	IIO_ENUM("power_mode", IIO_SHARED_BY_ALL, &bma180_power_mode_enum),
 	IIO_ENUM_AVAILABLE("power_mode", &bma180_power_mode_enum),
 	IIO_MOUNT_MATRIX(IIO_SHARED_BY_DIR, bma180_accel_get_mount_matrix),
 	{ }
Signature · 1 line
2.27.0
#1 lore raw
Quoted 1 line · On Tue, 7 Jul 2020 21:30:44 +0100 Jonathan Cameron <[email protected]> wrote:

From: Jonathan Cameron <[email protected]>

Title on this one is gibberish. Let us pretend that says

Fix: Use enum value IIO_SHARED_BY_ALL instead of a boolean.

Quoted 23 lines

This takes an enum, not a boolean. Discovered via warning when doing a W=1 build.

Fixes fdadbce0da4 ("iio: add Bosch BMA180 acceleration sensor driver")
---
 drivers/iio/accel/bma180.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/iio/accel/bma180.c +1 -1
index 5b7a467c7b27..3246a5ef7360 100644
@@ -673,7 +673,7 @@ static const struct iio_chan_spec_ext_info bma023_ext_info[] = {
 };
 
 static const struct iio_chan_spec_ext_info bma180_ext_info[] = {
-	IIO_ENUM("power_mode", true, &bma180_power_mode_enum),
+	IIO_ENUM("power_mode", IIO_SHARED_BY_ALL, &bma180_power_mode_enum),
 	IIO_ENUM_AVAILABLE("power_mode", &bma180_power_mode_enum),
 	IIO_MOUNT_MATRIX(IIO_SHARED_BY_DIR, bma180_accel_get_mount_matrix),
 	{ }