diff mbox series

[15/34] iio: humidity: hts221_buffer: explicitly add proper header files

Message ID 20220610084545.547700-16-nuno.sa@analog.com (mailing list archive)
State Superseded
Headers show
Series make iio inkern interface firmware agnostic | expand

Commit Message

Nuno Sa June 10, 2022, 8:45 a.m. UTC
Do not trust the fact that iio.h includes of.h which in turn includes
all the headers we are relying on.

The ultimate goal is to actually drop of.h from iio.h.

Signed-off-by: Nuno Sá <nuno.sa@analog.com>
---
 drivers/iio/humidity/hts221_buffer.c | 1 +
 1 file changed, 1 insertion(+)

Comments

Andy Shevchenko June 10, 2022, 2:47 p.m. UTC | #1
On Fri, Jun 10, 2022 at 10:47 AM Nuno Sá <nuno.sa@analog.com> wrote:
>
> Do not trust the fact that iio.h includes of.h which in turn includes
> all the headers we are relying on.
>
> The ultimate goal is to actually drop of.h from iio.h.

...

>  #include <linux/irqreturn.h>
>  #include <linux/regmap.h>
>  #include <linux/bitfield.h>
> +#include <linux/property.h>

Yes, I see, but you can make life easier if you try to squeeze to the
most sorted part. I do not see full context, but here I would put it
before regmap.h.
Jonathan Cameron June 11, 2022, 2:22 p.m. UTC | #2
On Fri, 10 Jun 2022 16:47:16 +0200
Andy Shevchenko <andy.shevchenko@gmail.com> wrote:

> On Fri, Jun 10, 2022 at 10:47 AM Nuno Sá <nuno.sa@analog.com> wrote:
> >
> > Do not trust the fact that iio.h includes of.h which in turn includes
> > all the headers we are relying on.
> >
> > The ultimate goal is to actually drop of.h from iio.h.  
> 
> ...
> 
> >  #include <linux/irqreturn.h>
> >  #include <linux/regmap.h>
> >  #include <linux/bitfield.h>
> > +#include <linux/property.h>  
> 
> Yes, I see, but you can make life easier if you try to squeeze to the
> most sorted part. I do not see full context, but here I would put it
> before regmap.h.
> 
With full context it's clear the list is way off sorted, but meh
putting it above regmap probably reduces the follow up diff a tiny
bit and I doubt Nuno feels strongly about this so I went with
what Andy suggested as a tweak whilst applying.

Applied

Thanks,

Jonathan
diff mbox series

Patch

diff --git a/drivers/iio/humidity/hts221_buffer.c b/drivers/iio/humidity/hts221_buffer.c
index f29692b9d2db..9010e355754e 100644
--- a/drivers/iio/humidity/hts221_buffer.c
+++ b/drivers/iio/humidity/hts221_buffer.c
@@ -13,6 +13,7 @@ 
 #include <linux/irqreturn.h>
 #include <linux/regmap.h>
 #include <linux/bitfield.h>
+#include <linux/property.h>
 
 #include <linux/iio/iio.h>
 #include <linux/iio/trigger.h>