diff mbox series

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

Message ID 20200913121227.764626-1-jic23@kernel.org
State New
Headers show
Series iio:accel:bma180: Fix use of true when should be iio_shared_by enum | expand

Commit Message

Jonathan Cameron Sept. 13, 2020, 12:12 p.m. UTC
From: Jonathan Cameron <Jonathan.Cameron@huawei.com>

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

Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Cc: Oleksandr Kravchenko <o.v.kravchenko@globallogic.com>
Cc: Peter Meerwald <pmeerw@pmeerw.net>
Cc: Jonathan Bakker <xc-racer2@live.ca>
---
 drivers/iio/accel/bma180.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Lars-Peter Clausen Sept. 18, 2020, 1:36 p.m. UTC | #1
On 9/13/20 2:12 PM, Jonathan Cameron wrote:
> From: Jonathan Cameron <Jonathan.Cameron@huawei.com>
>
> Given a value of 1 corresponds to IIO_SHARE_BY_TYPE I have replaced
> it with that.  Should cause no functional change.
>
> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
> Cc: Oleksandr Kravchenko <o.v.kravchenko@globallogic.com>
> Cc: Peter Meerwald <pmeerw@pmeerw.net>
> Cc: Jonathan Bakker <xc-racer2@live.ca>

Reviewed-by: Lars-Peter Clausen <lars@metafoo.de>


> ---
>   drivers/iio/accel/bma180.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/iio/accel/bma180.c b/drivers/iio/accel/bma180.c
> index 448faed001fd..6b74c2b04c15 100644
> --- a/drivers/iio/accel/bma180.c
> +++ b/drivers/iio/accel/bma180.c
> @@ -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),
>   	{ }
Matt Ranostay Sept. 18, 2020, 7:10 p.m. UTC | #2
On Sun, Sep 13, 2020 at 5:12 AM Jonathan Cameron <jic23@kernel.org> wrote:
>
> From: Jonathan Cameron <Jonathan.Cameron@huawei.com>
>
> Given a value of 1 corresponds to IIO_SHARE_BY_TYPE I have replaced
> it with that.  Should cause no functional change.
>

Reviewed-by: Matt Ranostay <matt.ranostay@konsulko.com>

> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
> Cc: Oleksandr Kravchenko <o.v.kravchenko@globallogic.com>
> Cc: Peter Meerwald <pmeerw@pmeerw.net>
> Cc: Jonathan Bakker <xc-racer2@live.ca>
> ---
>  drivers/iio/accel/bma180.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/iio/accel/bma180.c b/drivers/iio/accel/bma180.c
> index 448faed001fd..6b74c2b04c15 100644
> --- a/drivers/iio/accel/bma180.c
> +++ b/drivers/iio/accel/bma180.c
> @@ -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
>
Jonathan Cameron Sept. 19, 2020, 12:13 p.m. UTC | #3
On Fri, 18 Sep 2020 15:36:58 +0200
Lars-Peter Clausen <lars@metafoo.de> wrote:

> On 9/13/20 2:12 PM, Jonathan Cameron wrote:
> > From: Jonathan Cameron <Jonathan.Cameron@huawei.com>
> >
> > Given a value of 1 corresponds to IIO_SHARE_BY_TYPE I have replaced
> > it with that.  Should cause no functional change.
> >
> > Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
> > Cc: Oleksandr Kravchenko <o.v.kravchenko@globallogic.com>
> > Cc: Peter Meerwald <pmeerw@pmeerw.net>
> > Cc: Jonathan Bakker <xc-racer2@live.ca>  
> 
> Reviewed-by: Lars-Peter Clausen <lars@metafoo.de>
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

> 
> 
> > ---
> >   drivers/iio/accel/bma180.c | 2 +-
> >   1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/drivers/iio/accel/bma180.c b/drivers/iio/accel/bma180.c
> > index 448faed001fd..6b74c2b04c15 100644
> > --- a/drivers/iio/accel/bma180.c
> > +++ b/drivers/iio/accel/bma180.c
> > @@ -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),
> >   	{ }  
> 
>
diff mbox series

Patch

diff --git a/drivers/iio/accel/bma180.c b/drivers/iio/accel/bma180.c
index 448faed001fd..6b74c2b04c15 100644
--- a/drivers/iio/accel/bma180.c
+++ b/drivers/iio/accel/bma180.c
@@ -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),
 	{ }