iio:dac:ad5592r: Fix use of true for IIO_SHARED_BY_TYPE
Subsystems (2)
Jonathan Cameron
maintainerPATCH 1/1 iio:dac:ad5592r: Fix use of true for IIO_SHARED_BY_TYPE
From: Jonathan Cameron <[email protected]>
struct iio_chan_spec_ext_info shared element is of type
enum iio_shared_by, not boolean. It's like the enum value
will for IIO_SHARED_BY_TYPE == 1 == true, hence no actual problem has been observed.
CC [M] drivers/iio/dac/ad5592r-base.odrivers/iio/dac/ad5592r-base.c:491:13: warning: implicit conversion from ‘enum <anonymous>’ to ‘enum iio_shared_by’ [-Wenum-conversion]
491 | .shared = true,
|
--- drivers/iio/dac/ad5592r-base.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/iio/dac/ad5592r-base.c +1 -1
@@ -488,7 +488,7 @@ static const struct iio_chan_spec_ext_info ad5592r_ext_info[] = { { .name = "scale_available", .read = ad5592r_show_scale_available, - .shared = true, + .shared = IIO_SHARED_BY_TYPE, }, {}, };
Signature · 1 line
2.27.0
Quoted 24 lines · Jonathan Cameron
From: Jonathan Cameron <[email protected]>
struct
iio_chan_spec_ext_infoshared element is of type
enumiio_shared_by, not boolean. It's like the enum value
will forIIO_SHARED_BY_TYPE== 1 == true, hence no actual problem has been observed.CC [M]
drivers/iio/dac/ad5592r-base.odrivers/iio/dac/ad5592r-base.c:491:13: warning: implicit conversion from ‘enum <anonymous>’ to ‘enum iio_shared_by’ [-Wenum-conversion]
491 | .shared = true,|Fixes 56ca9db862bf ("iio: dac: Add support for the AD5592R/AD5593R ADCs/DACs")Signed-off-by Jonathan Cameron <[email protected]>Cc Alexandru Ardelean <[email protected]>--- drivers/iio/dac/ad5592r-base.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/iio/dac/ad5592r-base.c +0
-0
drivers/iio/dac/ad5592r-base.c static const struct iio_chan_spec_ext_info ad5592r_ext_info[] = { · line 491
Quoted 5 lines
drivers/iio/dac/ad5592r-base.c +1
-1@@ -488,7 +488,7 @@ static const struct iio_chan_spec_ext_info ad5592r_ext_info[] = { { .name = "scale_available", .read = ad5592r_show_scale_available, - .shared = true, + .shared = IIO_SHARED_BY_TYPE,
Quoted 6 lines
drivers/iio/dac/ad5592r-base.c +0
-1}, {}, }; --2.27.0
Jonathan Cameron
maintainerQuoted 20 lines · On Thu, 23 Jul 2020 08:59:17 +0300 Alexandru Ardelean <[email protected]>…
Quoted 19 lines · Jonathan Cameron
From: Jonathan Cameron <[email protected]>
struct
iio_chan_spec_ext_infoshared element is of type
enumiio_shared_by, not boolean. It's like the enum value
will forIIO_SHARED_BY_TYPE== 1 == true, hence no actual problem has been observed.CC [M]
drivers/iio/dac/ad5592r-base.odrivers/iio/dac/ad5592r-base.c:491:13: warning: implicit conversion from ‘enum <anonymous>’ to ‘enum iio_shared_by’ [-Wenum-conversion]
491 | .shared = true,|Fixes 56ca9db862bf ("iio: dac: Add support for the AD5592R/AD5593R ADCs/DACs")Signed-off-by Jonathan Cameron <[email protected]>Cc Alexandru Ardelean <[email protected]>--- drivers/iio/dac/ad5592r-base.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
Quoted 12 lines
drivers/iio/dac/ad5592r-base.c static const struct iio_chan_spec_ext_info ad5592r_ext_info[] = { · line 491
Quoted 10 lines
drivers/iio/dac/ad5592r-base.c +1
-1@@ -488,7 +488,7 @@ static const struct iio_chan_spec_ext_info ad5592r_ext_info[] = { { .name = "scale_available", .read = ad5592r_show_scale_available, - .shared = true, + .shared = IIO_SHARED_BY_TYPE,
Applied to the togreg branch of iio.git and pushed out as testing etc.
Ignore the fact I sent the same patch again having lost this version in my own email. oops
Jonathan
Quoted 7 lines
Quoted 7 lines
drivers/iio/dac/ad5592r-base.c +0
-1}, {}, }; --2.27.0