Re: [RFC PATCH 1/4] espi: add core bus framework
From: M, Krishnamoorthi
Date: Mon Aug 17 2026 - 06:58:03 EST
Hi,
On 8/12/2026 10:00 PM, Uwe Kleine-König wrote:
Hello,
On Wed, Aug 12, 2026 at 06:20:29PM +0530, M, Krishnamoorthi wrote:
On 8/6/2026 7:01 PM, Uwe Kleine-König wrote:
On Tue, Aug 04, 2026 at 05:22:56PM +0530, Krishnamoorthi M wrote:
[...]
+const struct bus_type espi_bus_type = {
+ .name = "espi",
+ .match = espi_bus_match,
+ .uevent = espi_bus_uevent,
+ .probe = espi_bus_probe,
+ .remove = espi_bus_remove,
+};
+EXPORT_SYMBOL_GPL(espi_bus_type);
Do you really need this exported?
Yes, it is required. Controller and slave drivers built as modules reference
espi_bus_type directly when registering devices. Without the export they
fail to link.
I would have expected that
drv->driver.bus = &espi_bus_type;
in __espi_register_driver() is enough for drivers to not have to use
that symbol directly?
You're right. __espi_register_driver() already sets
drv->driver.bus = &espi_bus_type,
and controllers register via espi_controller_register(), so no driver module references the symbol. I will drop the EXPORT_SYMBOL_GPL.
Thanks,
Krishna
Best regards
Uwe