Re: [PATCH] iio: inkern: Use namespaced exports
From: Jonathan Cameron
Date: Sun Dec 07 2025 - 09:01:13 EST
On Tue, 02 Dec 2025 08:30:58 +0100
Romain Gantois <romain.gantois@xxxxxxxxxxx> wrote:
> On Monday, 1 December 2025 18:15:54 CET David Lechner wrote:
> > On 12/1/25 4:59 AM, Romain Gantois wrote:
> > > Use namespaced exports for IIO consumer API functions.
> > >
> > > Signed-off-by: Romain Gantois <romain.gantois@xxxxxxxxxxx>
> > > ---
> >
> > ...
> >
> > > diff --git a/drivers/iio/dac/ds4424.c b/drivers/iio/dac/ds4424.c
> > > index a8198ba4f98a..33d6692f46fe 100644
> > > --- a/drivers/iio/dac/ds4424.c
> > > +++ b/drivers/iio/dac/ds4424.c
> > > @@ -14,7 +14,6 @@
> > >
> > > #include <linux/iio/iio.h>
> > > #include <linux/iio/driver.h>
> > > #include <linux/iio/machine.h>
> > >
> > > -#include <linux/iio/consumer.h>
> >
> > Unrelated change?
>
> Indeed, I'll leave that out in v2.
Please spin a precursor patch that makes that change.
That way we can easily check all files either both include that header
and have the namespace enabled, or neither.
I might merge this is a slightly funny way that leave it initially
not meeting that rule so that the precursor isn't in the immutable branch
for other subsystems but lets keep it logical in the patch set!
Jonathan
>
> > > #define DS4422_MAX_DAC_CHANNELS 2
> > > #define DS4424_MAX_DAC_CHANNELS 4
> > >
> > > @@ -321,3 +320,4 @@ MODULE_AUTHOR("Ismail H. Kose
> > > <ismail.kose@xxxxxxxxxxxxxxxxxxx>");>
> > > MODULE_AUTHOR("Vishal Sood <vishal.sood@xxxxxxxxxxxxxxxxxxx>");
> > > MODULE_AUTHOR("David Jung <david.jung@xxxxxxxxxxxxxxxxxxx>");
> > > MODULE_LICENSE("GPL v2");
> > >
> > > +MODULE_IMPORT_NS("IIO_CONSUMER");
> >
> > Is this actually needed if we don't use anything from consumer.h?
>
> No, it's not.
>
> Thanks,
>