Re: [RFC PATCH 1/4] espi: add core bus framework

"M, Krishnamoorthi" <[email protected]>
Newsgroups org.ozlabs.lists.openbmc,dev.linux.lists.chrome-platform,org.kernel.vger.linux-doc,org.kernel.vger.linux-kernel,org.kernel.vger.linux-spi,org.ozlabs.lists.linux-aspeed
Message-ID <[email protected]>
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
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.