Re: [PATCH v2 04/17] driver: core: Include headers for acpi_device_id and of_device_id for struct device_driver

From: Linus Torvalds

Date: Fri Jun 26 2026 - 14:31:30 EST


Ok, looking at these patches, I realize that I hate the pathname.

On Fri, 26 Jun 2026 at 11:01, Uwe Kleine-König (The Capable Hub)
<u.kleine-koenig@xxxxxxxxxxxx> wrote:
>
> +#include <linux/mod_device_id/acpi.h>
> +#include <linux/mod_device_id/of.h>

Honestly, that "mod_" part of the path name makes no sense to me.

Yes, it came from the old header name "mod_devicetable.h", and yes, it
comes from the fact that the device ID structures are also used for
module loading rules. So there's a historical reason for the "mod",
but I don't think it's a particularly good reason, and not a reason to
keep it.

None of the structures are called that - they are just called
"xyz_device_id", and while module loading may be *one* of the uses for
it, it certainly isn't the only one - or even the main one. Arguably a
much bigger reason for those device ids tend to be all the bus
matching code (ie acpi_match_device() and friends).

So let's just get rid of the "mod" part from the name, ok?

Linus