Re: [PATCH v1] clk: qcom: Drop inclusions of <linux/mod_devicetable.h>

From: Uwe Kleine-König (The Capable Hub)

Date: Thu Jul 16 2026 - 15:55:40 EST


Hello Brian,

On Thu, Jul 16, 2026 at 03:15:55PM -0400, Brian Masney wrote:
> On Thu, Jul 16, 2026 at 08:21:05PM +0200, Uwe Kleine-König (The Capable Hub) wrote:
> > The only used symbol in these four drivers that is provided by
> > <linux/mod_devicetable.h> is of_device_id and this is also provided by
> > <linux/platform_device.h>.
>
> I don't see it defined in platform_device, unless I am missing
> something?
>
> It looks like the reason this compiles is because of this chain of
> includes:
>
> linux/clk-provider.h -> linux/of.h -> linux/device-id/of.h

Well, the chain for <linux/platform_device.h> is:

<linux/platform_device.h>
-> <linux/device.h>
-> <linux/device/driver.h>
-> <linux/device-id/of.h>

but the more relevant thing is: <linux/platform_device.h> makes use of
struct of_device_id and most consumer of that header (typically platform
drivers) need struct of_device_id. So it's very sensible that
<linux/platform_device.h> is enough to get that definition. The include
chain is just an implementation detail.

> > So drop the unneeded include which brings us
> > one step closer to removing <linux/mod_devicetable.h>.
> >
> > Signed-off-by: Uwe Kleine-König (The Capable Hub) <u.kleine-koenig@xxxxxxxxxxxx>
>
> With an updated commit message:
>
> Reviewed-by: Brian Masney <bmasney@xxxxxxxxxx>

Does this discussion convince you that the commit log is ok as is?

Thanks
Uwe

Attachment: signature.asc
Description: PGP signature