Linux IIO development
 help / color / mirror / Atom feed
* [PATCH] iio: buffer: Use IIO_SEPARATE instead of a hard-coded 0
@ 2023-12-17 16:41 Christophe JAILLET
  2023-12-21 10:49 ` Jonathan Cameron
  0 siblings, 1 reply; 2+ messages in thread
From: Christophe JAILLET @ 2023-12-17 16:41 UTC (permalink / raw)
  To: Jonathan Cameron, Lars-Peter Clausen
  Cc: linux-kernel, kernel-janitors, Christophe JAILLET, linux-iio

Use an explicit IIO_SEPARATE instead of 0 for the 'shared_by' parameter
when calling __iio_add_chan_devattr().

For some reason, commit 3704432fb1fd ("iio: refactor info mask and ext_info
attribute creation.") updated only 1 place out of 4.
Update the remaining ones now.

Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
---
 drivers/iio/industrialio-buffer.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/iio/industrialio-buffer.c b/drivers/iio/industrialio-buffer.c
index 09c41e9ccf87..b581a7e80566 100644
--- a/drivers/iio/industrialio-buffer.c
+++ b/drivers/iio/industrialio-buffer.c
@@ -616,7 +616,7 @@ static int iio_buffer_add_channel_sysfs(struct iio_dev *indio_dev,
 				     &iio_show_fixed_type,
 				     NULL,
 				     0,
-				     0,
+				     IIO_SEPARATE,
 				     &indio_dev->dev,
 				     buffer,
 				     &buffer->buffer_attr_list);
@@ -629,7 +629,7 @@ static int iio_buffer_add_channel_sysfs(struct iio_dev *indio_dev,
 					     &iio_scan_el_show,
 					     &iio_scan_el_store,
 					     chan->scan_index,
-					     0,
+					     IIO_SEPARATE,
 					     &indio_dev->dev,
 					     buffer,
 					     &buffer->buffer_attr_list);
@@ -639,7 +639,7 @@ static int iio_buffer_add_channel_sysfs(struct iio_dev *indio_dev,
 					     &iio_scan_el_ts_show,
 					     &iio_scan_el_ts_store,
 					     chan->scan_index,
-					     0,
+					     IIO_SEPARATE,
 					     &indio_dev->dev,
 					     buffer,
 					     &buffer->buffer_attr_list);
-- 
2.34.1


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] iio: buffer: Use IIO_SEPARATE instead of a hard-coded 0
  2023-12-17 16:41 [PATCH] iio: buffer: Use IIO_SEPARATE instead of a hard-coded 0 Christophe JAILLET
@ 2023-12-21 10:49 ` Jonathan Cameron
  0 siblings, 0 replies; 2+ messages in thread
From: Jonathan Cameron @ 2023-12-21 10:49 UTC (permalink / raw)
  To: Christophe JAILLET
  Cc: Lars-Peter Clausen, linux-kernel, kernel-janitors, linux-iio

On Sun, 17 Dec 2023 17:41:45 +0100
Christophe JAILLET <christophe.jaillet@wanadoo.fr> wrote:

> Use an explicit IIO_SEPARATE instead of 0 for the 'shared_by' parameter
> when calling __iio_add_chan_devattr().
> 
> For some reason, commit 3704432fb1fd ("iio: refactor info mask and ext_info
> attribute creation.") updated only 1 place out of 4.
> Update the remaining ones now.
> 
> Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Makes sense

Applied to the togreg branch of iio.git.

It's fairly unlikely I'll get another pull request out unless the final
6.7 release isn't until after the new year for some reason.

As such, this is probably now 6.9 material

Thanks,

Jonathan

> ---
>  drivers/iio/industrialio-buffer.c | 6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/drivers/iio/industrialio-buffer.c b/drivers/iio/industrialio-buffer.c
> index 09c41e9ccf87..b581a7e80566 100644
> --- a/drivers/iio/industrialio-buffer.c
> +++ b/drivers/iio/industrialio-buffer.c
> @@ -616,7 +616,7 @@ static int iio_buffer_add_channel_sysfs(struct iio_dev *indio_dev,
>  				     &iio_show_fixed_type,
>  				     NULL,
>  				     0,
> -				     0,
> +				     IIO_SEPARATE,
>  				     &indio_dev->dev,
>  				     buffer,
>  				     &buffer->buffer_attr_list);
> @@ -629,7 +629,7 @@ static int iio_buffer_add_channel_sysfs(struct iio_dev *indio_dev,
>  					     &iio_scan_el_show,
>  					     &iio_scan_el_store,
>  					     chan->scan_index,
> -					     0,
> +					     IIO_SEPARATE,
>  					     &indio_dev->dev,
>  					     buffer,
>  					     &buffer->buffer_attr_list);
> @@ -639,7 +639,7 @@ static int iio_buffer_add_channel_sysfs(struct iio_dev *indio_dev,
>  					     &iio_scan_el_ts_show,
>  					     &iio_scan_el_ts_store,
>  					     chan->scan_index,
> -					     0,
> +					     IIO_SEPARATE,
>  					     &indio_dev->dev,
>  					     buffer,
>  					     &buffer->buffer_attr_list);


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2023-12-21 10:49 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-12-17 16:41 [PATCH] iio: buffer: Use IIO_SEPARATE instead of a hard-coded 0 Christophe JAILLET
2023-12-21 10:49 ` Jonathan Cameron

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox