Re: [PATCH] iio: Move include/linux/iio-opaque.h to drivers/iio/iio_opaque.h

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sun, Oct 3, 2021 at 5:58 PM Jonathan Cameron <jic23@xxxxxxxxxx> wrote:
>
> From: Jonathan Cameron <Jonathan.Cameron@xxxxxxxxxx>
>
> This header is only intended for use within IIO core modules so move
> it to an appropriate location.  Also rename to bring it inline with
> other IIO core only headers.
>

Should we merge this into drivers/iio/iio_core.h ?

Either way:

Reviewed-by: Alexandru Ardelean <ardeleanalex@xxxxxxxxx>

> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@xxxxxxxxxx>
> Cc: Alexandru Ardelean <ardeleanalex@xxxxxxxxx>
> Cc: Alexandru Ardelean <aardelean@xxxxxxxxxxx>
> ---
>
> I'm not sure if there was a strong reason this file was in
> include/linux/iio before?

No strong reason.
I guess mostly inertial.
I was looking at the "./include/linux/iio/buffer_impl.h" and went
along with the same include/linux/iio path.
I was also thinking that maybe some older non-upstream IIO drivers
would prefer the "include/linux/iio" path, but that's still not a
great reason to put it there.

There is "drivers/iio/iio_core.h" which seemed like a minimal include
to be shared between the core, buffer and trigger IIO files.
Maybe it makes sense to merge "drivers/iio/iio_core.h" & iio-opaque.h ?

Especially since:

drivers/iio/industrialio-buffer.c:#include <linux/iio/iio-opaque.h>
drivers/iio/industrialio-core.c:#include <linux/iio/iio-opaque.h>
drivers/iio/industrialio-event.c:#include <linux/iio/iio-opaque.h>
drivers/iio/industrialio-trigger.c:#include <linux/iio/iio-opaque.h>
drivers/iio/inkern.c:#include <linux/iio/iio-opaque.h>


>
>
>  include/linux/iio/iio-opaque.h => drivers/iio/iio_opaque.h | 0
>  drivers/iio/industrialio-buffer.c                          | 2 +-
>  drivers/iio/industrialio-core.c                            | 2 +-
>  drivers/iio/industrialio-event.c                           | 2 +-
>  drivers/iio/industrialio-trigger.c                         | 2 +-
>  drivers/iio/inkern.c                                       | 2 +-
>  6 files changed, 5 insertions(+), 5 deletions(-)
>
> diff --git a/include/linux/iio/iio-opaque.h b/drivers/iio/iio_opaque.h
> similarity index 100%
> rename from include/linux/iio/iio-opaque.h
> rename to drivers/iio/iio_opaque.h
> diff --git a/drivers/iio/industrialio-buffer.c b/drivers/iio/industrialio-buffer.c
> index a95cc2da56be..ed7a5c0a31e1 100644
> --- a/drivers/iio/industrialio-buffer.c
> +++ b/drivers/iio/industrialio-buffer.c
> @@ -21,9 +21,9 @@
>  #include <linux/sched/signal.h>
>
>  #include <linux/iio/iio.h>
> -#include <linux/iio/iio-opaque.h>
>  #include "iio_core.h"
>  #include "iio_core_trigger.h"
> +#include "iio_opaque.h"
>  #include <linux/iio/sysfs.h>
>  #include <linux/iio/buffer.h>
>  #include <linux/iio/buffer_impl.h>
> diff --git a/drivers/iio/industrialio-core.c b/drivers/iio/industrialio-core.c
> index 2dbb37e09b8c..6afa70c89c80 100644
> --- a/drivers/iio/industrialio-core.c
> +++ b/drivers/iio/industrialio-core.c
> @@ -25,9 +25,9 @@
>  #include <linux/debugfs.h>
>  #include <linux/mutex.h>
>  #include <linux/iio/iio.h>
> -#include <linux/iio/iio-opaque.h>
>  #include "iio_core.h"
>  #include "iio_core_trigger.h"
> +#include "iio_opaque.h"
>  #include <linux/iio/sysfs.h>
>  #include <linux/iio/events.h>
>  #include <linux/iio/buffer.h>
> diff --git a/drivers/iio/industrialio-event.c b/drivers/iio/industrialio-event.c
> index d0732eac0f0a..1d49714d9832 100644
> --- a/drivers/iio/industrialio-event.c
> +++ b/drivers/iio/industrialio-event.c
> @@ -18,8 +18,8 @@
>  #include <linux/uaccess.h>
>  #include <linux/wait.h>
>  #include <linux/iio/iio.h>
> -#include <linux/iio/iio-opaque.h>
>  #include "iio_core.h"
> +#include "iio_opaque.h"
>  #include <linux/iio/sysfs.h>
>  #include <linux/iio/events.h>
>
> diff --git a/drivers/iio/industrialio-trigger.c b/drivers/iio/industrialio-trigger.c
> index b23caa2f2aa1..e4e59466a263 100644
> --- a/drivers/iio/industrialio-trigger.c
> +++ b/drivers/iio/industrialio-trigger.c
> @@ -13,10 +13,10 @@
>  #include <linux/slab.h>
>
>  #include <linux/iio/iio.h>
> -#include <linux/iio/iio-opaque.h>
>  #include <linux/iio/trigger.h>
>  #include "iio_core.h"
>  #include "iio_core_trigger.h"
> +#include "iio_opaque.h"
>  #include <linux/iio/trigger_consumer.h>
>
>  /* RFC - Question of approach
> diff --git a/drivers/iio/inkern.c b/drivers/iio/inkern.c
> index 0222885b334c..72c130d9fecb 100644
> --- a/drivers/iio/inkern.c
> +++ b/drivers/iio/inkern.c
> @@ -10,8 +10,8 @@
>  #include <linux/of.h>
>
>  #include <linux/iio/iio.h>
> -#include <linux/iio/iio-opaque.h>
>  #include "iio_core.h"
> +#include "iio_opaque.h"
>  #include <linux/iio/machine.h>
>  #include <linux/iio/driver.h>
>  #include <linux/iio/consumer.h>
> --
> 2.33.0
>



[Index of Archives]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Input]     [Linux Kernel]     [Linux SCSI]     [X.org]

  Powered by Linux