Re: [PATCH 1/3] driver core: generalize driver_override in struct device
From: Danilo Krummrich
Date: Mon Mar 02 2026 - 11:29:16 EST
On Mon Mar 2, 2026 at 11:23 AM CET, Armin Wolf wrote:
> Nice patch series, centralizing the handling of driver_override in the
> device core removes a lot of duplicated code.
>
> I wonder if we can also move DEVICE_ATTR_DRIVER_OVERRIDE() into the device
> core by registering the associated sysfs attribute inside bus_add_device().
>
> Bus types that honor driver_override could for example set a boolean flag
> inside struct bus_type to tell the device core that driver_override is
> supported.
>
> However this is just a suggestion, the current patch series seems fine to me.
That's a very good suggestion, thanks for pointing it out. In fact, I already
thought of this at some point, but then forgot to implement it. :)