Re: [PATCH 3/3] drivers core: allow id match override when manually binding driver

From: Dan Williams
Date: Sun Jun 26 2016 - 00:15:52 EST


On Thu, Jun 23, 2016 at 10:41 AM, Michal Suchanek <hramrach@xxxxxxxxx> wrote:
> This allows binding spidev on any slave device by hand using sysfs
> without adding superfluous compatibles or any other needless
> complication.
>
> Note that any slave driver that requires configuration will fail to
> probe anyway. Only a driver that binds to anything can be bound
> successfully.
>
> Signed-off-by: Michal Suchanek <hramrach@xxxxxxxxx>
> ---
> drivers/base/Kconfig.debug | 14 +++++++++
> drivers/base/bus.c | 72 +++++++++++++++++++++++++++++++++++++++++++++-
> lib/Kconfig.debug | 2 ++
> 3 files changed, 87 insertions(+), 1 deletion(-)
> create mode 100644 drivers/base/Kconfig.debug
>

Why change the driver core? The matching policy can be changed with
the "match" operation of a custom "struct bus_type".