Skip to content

Commit 1855e18

Browse files
mwallegregkh
authored andcommitted
nvmem: layouts: fix automatic module loading
commit 810b790 upstream. To support loading of a layout module automatically the MODALIAS variable in the uevent is needed. Add it. Fixes: fc29fd8 ("nvmem: core: Rework layouts to become regular devices") Cc: stable@vger.kernel.org Signed-off-by: Michael Walle <mwalle@kernel.org> Reviewed-by: Miquel Raynal <miquel.raynal@bootlin.com> Signed-off-by: Srinivas Kandagatla <srini@kernel.org> Link: https://lore.kernel.org/r/20250912131347.303345-2-srini@kernel.org Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
1 parent 4827bd6 commit 1855e18

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

drivers/nvmem/layouts.c

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,11 +45,24 @@ static void nvmem_layout_bus_remove(struct device *dev)
4545
return drv->remove(layout);
4646
}
4747

48+
static int nvmem_layout_bus_uevent(const struct device *dev,
49+
struct kobj_uevent_env *env)
50+
{
51+
int ret;
52+
53+
ret = of_device_uevent_modalias(dev, env);
54+
if (ret != ENODEV)
55+
return ret;
56+
57+
return 0;
58+
}
59+
4860
static const struct bus_type nvmem_layout_bus_type = {
4961
.name = "nvmem-layout",
5062
.match = nvmem_layout_bus_match,
5163
.probe = nvmem_layout_bus_probe,
5264
.remove = nvmem_layout_bus_remove,
65+
.uevent = nvmem_layout_bus_uevent,
5366
};
5467

5568
int __nvmem_layout_driver_register(struct nvmem_layout_driver *drv,

0 commit comments

Comments
 (0)