Re: [PATCH v1 1/1] gpio: generic: Don't use 'proxy' headers
From: Andy Shevchenko
Date: Thu Feb 26 2026 - 04:41:59 EST
On Thu, Feb 26, 2026 at 10:24:59AM +0100, Bartosz Golaszewski wrote:
> On Thu, Feb 26, 2026 at 10:20 AM Andy Shevchenko
> <andriy.shevchenko@xxxxxxxxxxxxxxx> wrote:
...
> > #include <linux/bitops.h>
> > #include <linux/cleanup.h>
> > -#include <linux/compiler.h>
> > #include <linux/err.h>
> > -#include <linux/init.h>
> > #include <linux/io.h>
> > #include <linux/ioport.h>
> > +#include <linux/limits.h>
> > #include <linux/log2.h>
> > #include <linux/mod_devicetable.h>
> > #include <linux/module.h>
> > #include <linux/pinctrl/consumer.h>
> > #include <linux/platform_device.h>
> > #include <linux/property.h>
> > -#include <linux/slab.h>
>
> In that case don't we need device.h for devm_kzalloc()?
(It is device/devres.h, but read below)
It comes thru platform_device.h. And if you follow my attempts to split
device.h, the state of affairs will look like not much will happen there,
so the platform_device.h <- device.h <- devres/device.h is guaranteed.
TL;DR: if we have platform_device.h, it covers everything that device.h
provides.
--
With Best Regards,
Andy Shevchenko