]> www.infradead.org Git - users/dwmw2/linux.git/commit
driver core: add a faux bus for use when a simple device/bus is needed
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 10 Feb 2025 12:30:25 +0000 (13:30 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 13 Feb 2025 15:58:51 +0000 (16:58 +0100)
commit35fa2d88ca9481e5caf533d58b99ca259c63b2fe
treeeec90f8ccb9a60ece0045967ddd8b26723c8d2f1
parenta64dcfb451e254085a7daee5fe51bf22959d52d3
driver core: add a faux bus for use when a simple device/bus is needed

Many drivers abuse the platform driver/bus system as it provides a
simple way to create and bind a device to a driver-specific set of
probe/release functions.  Instead of doing that, and wasting all of the
memory associated with a platform device, here is a "faux" bus that
can be used instead.

Reviewed-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Reviewed-by: Danilo Krummrich <dakr@kernel.org>
Reviewed-by: Lyude Paul <lyude@redhat.com>
Reviewed-by: Thomas Weißschuh <thomas.weissschuh@linutronix.de>
Reviewed-by: Zijun Hu <quic_zijuhu@quicinc.com>
Link: https://lore.kernel.org/r/2025021026-atlantic-gibberish-3f0c@gregkh
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Documentation/driver-api/infrastructure.rst
drivers/base/Makefile
drivers/base/base.h
drivers/base/faux.c [new file with mode: 0644]
drivers/base/init.c
include/linux/device/faux.h [new file with mode: 0644]