kernel: remove custom partition name patch
authorDaniel Golle <daniel@makrotopia.org>
Mon, 1 Nov 2021 16:17:45 +0000 (16:17 +0000)
committerDaniel Golle <daniel@makrotopia.org>
Mon, 1 Nov 2021 18:20:18 +0000 (18:20 +0000)
Don't patch the kernel to expose the partition name in sysfs as it is
already exposed via 'uevent'.
All previous users have been converted to use 'uevent', so we can
safely drop the custom patch.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
target/linux/generic/hack-5.10/410-block-fit-partition-parser.patch

index c417c78eb6c2a8c23cfc032616ba6be2de4e97fa..41d4fd54fcd65d37367d427647935983faf149d7 100644 (file)
  #ifdef CONFIG_SGI_PARTITION
        sgi_partition,
  #endif
-@@ -215,6 +222,18 @@ static ssize_t part_discard_alignment_sh
-                               p->start_sect));
- }
-+static ssize_t part_name_show(struct device *dev,
-+                            struct device_attribute *attr, char *buf)
-+{
-+      struct hd_struct *p = dev_to_part(dev);
-+
-+      if (p->info && p->info->volname)
-+              return sprintf(buf, "%s\n", p->info->volname);
-+
-+      buf[0] = '\0';
-+      return 0;
-+}
-+
- static DEVICE_ATTR(partition, 0444, part_partition_show, NULL);
- static DEVICE_ATTR(start, 0444, part_start_show, NULL);
- static DEVICE_ATTR(size, 0444, part_size_show, NULL);
-@@ -223,6 +242,7 @@ static DEVICE_ATTR(alignment_offset, 044
- static DEVICE_ATTR(discard_alignment, 0444, part_discard_alignment_show, NULL);
- static DEVICE_ATTR(stat, 0444, part_stat_show, NULL);
- static DEVICE_ATTR(inflight, 0444, part_inflight_show, NULL);
-+static DEVICE_ATTR(name, 0444, part_name_show, NULL);
- #ifdef CONFIG_FAIL_MAKE_REQUEST
- static struct device_attribute dev_attr_fail =
-       __ATTR(make-it-fail, 0644, part_fail_show, part_fail_store);
-@@ -237,6 +257,7 @@ static struct attribute *part_attrs[] =
-       &dev_attr_discard_alignment.attr,
-       &dev_attr_stat.attr,
-       &dev_attr_inflight.attr,
-+      &dev_attr_name.attr,
- #ifdef CONFIG_FAIL_MAKE_REQUEST
-       &dev_attr_fail.attr,
- #endif
-@@ -694,6 +715,11 @@ static bool blk_add_partition(struct gen
+@@ -694,6 +701,11 @@ static bool blk_add_partition(struct gen
            (state->parts[p].flags & ADDPART_FLAG_RAID))
                md_autodetect_dev(part_to_dev(part)->devt);