Blob Blame History Raw
From 5fe68a4d85bfd7d0ed1a4bcfb12120e2b7dd26f5 Mon Sep 17 00:00:00 2001
From: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Date: Wed, 22 Jul 2020 15:25:15 +0100
Subject: [PATCH] iio:dac:ad5592r: Fix use of true for IIO_SHARED_BY_TYPE
Git-commit: 5fe68a4d85bfd7d0ed1a4bcfb12120e2b7dd26f5
Patch-mainline: v5.10-rc1
References: git-fixes

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.o
  491 |   .shared = true,
      |

Fixes: 56ca9db862bf ("iio: dac: Add support for the AD5592R/AD5593R ADCs/DACs")
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Acked-by: Alexandru Ardelean <alexandru.ardelean@analog.com>
Link: https://lore.kernel.org/r/20200722142515.897378-1-jic23@kernel.org
Acked-by: Takashi Iwai <tiwai@suse.de>

---
 drivers/iio/dac/ad5592r-base.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/iio/dac/ad5592r-base.c b/drivers/iio/dac/ad5592r-base.c
index cc4875660a69..456bf5292c44 100644
--- a/drivers/iio/dac/ad5592r-base.c
+++ b/drivers/iio/dac/ad5592r-base.c
@@ -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,
 	 },
 	{},
 };
-- 
2.16.4