Skip to contentSkip to conversation

iio:accel:bma180: Fix use of true when should be iio_shared_by enum

PATCH In review Jonathan Cameron 3 participants 4 messages Sep 13, 2020 – Sep 19, 2020 IIO

lore
Share & tools
lore

Jonathan Cameron

author maintainer
#0 lore raw

PATCH 1/1 iio:accel:bma180: Fix use of true when should be iio_shared_by enum

From: Jonathan Cameron <[email protected]>

Given a value of 1 corresponds to IIO_SHARE_BY_TYPE I have replaced it with that. Should cause no functional change.

Cc Oleksandr Kravchenko <[email protected]>
Cc Peter Meerwald <[email protected]>
Cc Jonathan Bakker <[email protected]>
---
 drivers/iio/accel/bma180.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/iio/accel/bma180.c +1 -1
index 448faed001fd..6b74c2b04c15 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_TYPE, &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.28.0
Reviewed-by on v1 1/1
#1 lore raw
Quoted 9 lines · Jonathan Cameron

From: Jonathan Cameron <[email protected]>

Given a value of 1 corresponds to IIO_SHARE_BY_TYPE I have replaced it with that. Should cause no functional change.

Cc Oleksandr Kravchenko <[email protected]>
Cc Peter Meerwald <[email protected]>
Cc Jonathan Bakker <[email protected]>
Quoted 17 lines
---
  drivers/iio/accel/bma180.c | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
drivers/iio/accel/bma180.c +1 -1
index 448faed001fd..6b74c2b04c15 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_TYPE, &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),
  	{ }
author maintainer
#2 lore raw
Quoted 6 lines · On Fri, 18 Sep 2020 15:36:58 +0200 Lars-Peter Clausen <[email protected]> wrote:
Quoted 5 lines · Jonathan Cameron

From: Jonathan Cameron <[email protected]>

Given a value of 1 corresponds to IIO_SHARE_BY_TYPE I have replaced it with that. Should cause no functional change.

Quoted 6 lines
Quoted 4 lines
Cc Oleksandr Kravchenko <[email protected]>
Cc Peter Meerwald <[email protected]>
Cc Jonathan Bakker <[email protected]>

Thanks. Applied to the togreg branch of iio.git.
I haven't marked it for stable because it has not material affect. Not a problem if it gets picked up anyway of course!

Thanks,

Jonathan

Quoted 21 lines
Quoted 19 lines

---
  drivers/iio/accel/bma180.c | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
drivers/iio/accel/bma180.c +1 -1
index 448faed001fd..6b74c2b04c15 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_TYPE, &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),
  	{ }  
Reviewed-by on v1 1/1
#3 lore raw
In reply to Jonathan Cameron
Quoted 6 lines · Jonathan Cameron

From: Jonathan Cameron <[email protected]>

Given a value of 1 corresponds to IIO_SHARE_BY_TYPE I have replaced it with that. Should cause no functional change.

Quoted 24 lines
Cc Oleksandr Kravchenko <[email protected]>
Cc Peter Meerwald <[email protected]>
Cc Jonathan Bakker <[email protected]>
---
 drivers/iio/accel/bma180.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/iio/accel/bma180.c +1 -2
index 448faed001fd..6b74c2b04c15 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_TYPE, &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),
        { }
--

2.28.0