Re: [PATCH] iio: adc: Explicitly include correct DT includes

From: Jonathan Cameron
Date: Sun Jul 23 2023 - 08:39:04 EST


On Sat, 15 Jul 2023 18:25:10 +0100
Jonathan Cameron <jic23@xxxxxxxxxx> wrote:

> On Fri, 14 Jul 2023 11:46:26 -0600
> Rob Herring <robh@xxxxxxxxxx> wrote:
>
> > The DT of_device.h and of_platform.h date back to the separate
> > of_platform_bus_type before it as merged into the regular platform bus.
> > As part of that merge prepping Arm DT support 13 years ago, they
> > "temporarily" include each other. They also include platform_device.h
> > and of.h. As a result, there's a pretty much random mix of those include
> > files used throughout the tree. In order to detangle these headers and
> > replace the implicit includes with struct declarations, users need to
> > explicitly include the correct includes.
> >
> > Signed-off-by: Rob Herring <robh@xxxxxxxxxx>
>
> Hi Rob,
>
> Just one in here that I noticed isn't quite right. I'd have fixed it
> up (and can still do so if nothing else comes up) but I want to give
> this more time on list anyway so won't pick it up today.

Fixed up whilst applying.

Applied to the togreg branch of iio.git and pushed out as testing to see
if 0-day can find anything we missed.

Thanks,

Jonathan

>
> Jonathan
>
> > diff --git a/drivers/iio/adc/stmpe-adc.c b/drivers/iio/adc/stmpe-adc.c
> > index 67518e460e05..55e36b40fdf5 100644
> > --- a/drivers/iio/adc/stmpe-adc.c
> > +++ b/drivers/iio/adc/stmpe-adc.c
> > @@ -14,9 +14,10 @@
> > #include <linux/kernel.h>
> > #include <linux/mfd/stmpe.h>
> > #include <linux/module.h>
> > -#include <linux/of_platform.h>
> > +#include <linux/of.h>
> > #include <linux/platform_device.h>
> > #include <linux/device.h>
> > +#include <linux/of.h>
>
> Duplicate include.
>