mirror of
git://git.kernel.org/pub/scm/linux/kernel/git/xiang/erofs.git
synced 2026-10-28 12:53:14 +01:00
nvmem: layouts: fix automatic module loading
To support loading of a layout module automatically the MODALIAS
variable in the uevent is needed. Add it.
Fixes: fc29fd821d ("nvmem: core: Rework layouts to become regular devices")
Cc: [email protected]
Signed-off-by: Michael Walle <[email protected]>
Reviewed-by: Miquel Raynal <[email protected]>
Signed-off-by: Srinivas Kandagatla <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Greg Kroah-Hartman <[email protected]>
This commit is contained in:
1 parent
1b237f190e
commit
810b790033
1 file changed
+13
@@ -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,
|
||||
|
||||
Reference in new issue
Block a user