[PATCH 16/18] misc: storage-by-alias: register as link to main cdev
Ahmad Fatoum
a.fatoum at pengutronix.de
Sun Apr 13 23:31:50 PDT 2025
By establishing the link, we ensure that the storage-by-alias device is
freed alongside the original device and also that resolving the parent
device will automatically point at the original device.
Signed-off-by: Ahmad Fatoum <a.fatoum at pengutronix.de>
---
drivers/misc/storage-by-alias.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/misc/storage-by-alias.c b/drivers/misc/storage-by-alias.c
index ece5929d60ce..4a0513236743 100644
--- a/drivers/misc/storage-by-alias.c
+++ b/drivers/misc/storage-by-alias.c
@@ -133,6 +133,7 @@ static int sba_add_partitions(struct cdev *rcdev, void *data)
return 0;
sba->rcdev = rcdev;
+ sba->cdev.link = rcdev;
sba->cdev.name = sba->alias;
sba->cdev.size = rcdev->size;
sba->cdev.ops = &sba_ops;
--
2.39.5
More information about the barebox
mailing list