diff options
author | Daniel Golle <daniel@makrotopia.org> | 2022-12-22 22:33:31 +0300 |
---|---|---|
committer | Richard Weinberger <richard@nod.at> | 2023-02-14 00:24:10 +0300 |
commit | 05b8773ca33253ea562be145cf3145b05ef19f86 (patch) | |
tree | 523b06d92969f2f7efe488d3458909a1788d2af8 /drivers/mtd/ubi/block.c | |
parent | 1ecf9e390452e73a362ea7fbde8f3f0db83de856 (diff) | |
download | linux-05b8773ca33253ea562be145cf3145b05ef19f86.tar.xz |
mtd: ubi: block: wire-up device parent
ubiblock devices were previously only identifyable by their name, but
not connected to their parent UBI volume device e.g. in sysfs.
Properly parent ubiblock device as descendant of a UBI volume device
to reflect device model hierachy.
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
Signed-off-by: Richard Weinberger <richard@nod.at>
Diffstat (limited to 'drivers/mtd/ubi/block.c')
-rw-r--r-- | drivers/mtd/ubi/block.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/mtd/ubi/block.c b/drivers/mtd/ubi/block.c index f5d036203fe7..6a9eb2c860b5 100644 --- a/drivers/mtd/ubi/block.c +++ b/drivers/mtd/ubi/block.c @@ -419,7 +419,7 @@ int ubiblock_create(struct ubi_volume_info *vi) list_add_tail(&dev->list, &ubiblock_devices); /* Must be the last step: anyone can call file ops from now on */ - ret = add_disk(dev->gd); + ret = device_add_disk(vi->dev, dev->gd, NULL); if (ret) goto out_remove_minor; |