Skip to contentSkip to conversation

nvmem: fixes for 6.17

PATCH New [email protected] 1 participant 2 messages Sep 12, 2025

Subsystems (2)
lore
Share & tools
lore

[email protected]

author maintainer
#0 lore raw

cover nvmem: fixes for 6.17

From: Srinivas Kandagatla <[email protected]>

Hi Greg,

Here is one nvmem fix which can go for 6.17 release
If its not too late, could you please queue these as 6.17 material.

Fix is mainly to do with module loading of layouts.

Thanks,
Srini

Michael Walle (1):
nvmem: layouts: fix automatic module loading

 drivers/nvmem/layouts.c | 13 +++++++++++++
 1 file changed, 13 insertions(+)
Signature · 1 line
2.50.0
author maintainer
#1 lore raw

PATCH 1/1 nvmem: layouts: fix automatic module loading

From: Michael Walle <[email protected]>

To support loading of a layout module automatically the MODALIAS variable in the uevent is needed. Add it.

Fixes fc29fd821d9a ("nvmem: core: Rework layouts to become regular devices")
---
 drivers/nvmem/layouts.c | 13 +++++++++++++
 1 file changed, 13 insertions(+)
drivers/nvmem/layouts.c +13 -0
index 65d39e19f6ec..f381ce1e84bd 100644
@@ -45,11 +45,24 @@ static void nvmem_layout_bus_remove(struct device *dev)
 	return drv->remove(layout);
 }
 
+static int nvmem_layout_bus_uevent(const struct device *dev,
+				   struct kobj_uevent_env *env)
+{
+	int ret;
+
+	ret = of_device_uevent_modalias(dev, env);
+	if (ret != ENODEV)
+		return ret;
+
+	return 0;
+}
+
 static const struct bus_type nvmem_layout_bus_type = {
 	.name		= "nvmem-layout",
 	.match		= nvmem_layout_bus_match,
 	.probe		= nvmem_layout_bus_probe,
 	.remove		= nvmem_layout_bus_remove,
+	.uevent		= nvmem_layout_bus_uevent,
 };
 
 int __nvmem_layout_driver_register(struct nvmem_layout_driver *drv,
Signature · 1 line
2.50.0