aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/generic/hack-5.15/402-mtd-blktrans-call-add-disks-after-mtd-device.patch
diff options
context:
space:
mode:
Diffstat (limited to 'target/linux/generic/hack-5.15/402-mtd-blktrans-call-add-disks-after-mtd-device.patch')
-rw-r--r--target/linux/generic/hack-5.15/402-mtd-blktrans-call-add-disks-after-mtd-device.patch8
1 files changed, 4 insertions, 4 deletions
diff --git a/target/linux/generic/hack-5.15/402-mtd-blktrans-call-add-disks-after-mtd-device.patch b/target/linux/generic/hack-5.15/402-mtd-blktrans-call-add-disks-after-mtd-device.patch
index 988d900b31..a715d17f3b 100644
--- a/target/linux/generic/hack-5.15/402-mtd-blktrans-call-add-disks-after-mtd-device.patch
+++ b/target/linux/generic/hack-5.15/402-mtd-blktrans-call-add-disks-after-mtd-device.patch
@@ -51,7 +51,7 @@ Signed-off-by: Daniel Golle <daniel@makrotopia.org>
+
+ list_for_each_entry(tr, &blktrans_majors, list) {
+ list_for_each_entry_safe(dev, next, &tr->devs, list) {
-+ if (dev->disk->flags & GENHD_FL_UP)
++ if (disk_live(dev->disk))
+ continue;
+
+ device_add_disk(&dev->mtd->dev, dev->disk, NULL);
@@ -88,11 +88,11 @@ Signed-off-by: Daniel Golle <daniel@makrotopia.org>
del_mtd_device(mtd);
--- a/include/linux/mtd/blktrans.h
+++ b/include/linux/mtd/blktrans.h
-@@ -76,6 +76,6 @@ extern int deregister_mtd_blktrans(struc
+@@ -76,6 +76,7 @@ extern int deregister_mtd_blktrans(struc
extern int add_mtd_blktrans_dev(struct mtd_blktrans_dev *dev);
extern int del_mtd_blktrans_dev(struct mtd_blktrans_dev *dev);
extern int mtd_blktrans_cease_background(struct mtd_blktrans_dev *dev);
--
+extern void register_mtd_blktrans_devs(void);
- #endif /* __MTD_TRANS_H__ */
+ /**
+ * module_mtd_blktrans() - Helper macro for registering a mtd blktrans driver