aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/generic/pending-5.4/495-mtd-core-add-get_mtd_device_by_node.patch
diff options
context:
space:
mode:
authorDaniel Golle <daniel@makrotopia.org>2022-03-21 01:16:48 +0000
committerDaniel Golle <daniel@makrotopia.org>2022-03-21 13:11:56 +0000
commit786bf7fdaca4c75e7eba6e9aa3a8b5775fd21186 (patch)
tree926fecb2b1f6ce1e42ba7ef4c7aab8e68dfd214c /target/linux/generic/pending-5.4/495-mtd-core-add-get_mtd_device_by_node.patch
parent9470160c350d15f765c33d6c1db15d6c4709a64c (diff)
downloadupstream-786bf7fdaca4c75e7eba6e9aa3a8b5775fd21186.tar.gz
upstream-786bf7fdaca4c75e7eba6e9aa3a8b5775fd21186.tar.bz2
upstream-786bf7fdaca4c75e7eba6e9aa3a8b5775fd21186.zip
kernel: delete Linux 5.4 config and patches
As the upcoming release will be based on Linux 5.10 only, remove all kernel configuration as well as patches for Linux 5.4. There were no targets still actively using Linux 5.4. Signed-off-by: Daniel Golle <daniel@makrotopia.org> (cherry picked from commit 3a14580411adfb75f9a44eded9f41245b9e44606)
Diffstat (limited to 'target/linux/generic/pending-5.4/495-mtd-core-add-get_mtd_device_by_node.patch')
-rw-r--r--target/linux/generic/pending-5.4/495-mtd-core-add-get_mtd_device_by_node.patch75
1 files changed, 0 insertions, 75 deletions
diff --git a/target/linux/generic/pending-5.4/495-mtd-core-add-get_mtd_device_by_node.patch b/target/linux/generic/pending-5.4/495-mtd-core-add-get_mtd_device_by_node.patch
deleted file mode 100644
index a173381820..0000000000
--- a/target/linux/generic/pending-5.4/495-mtd-core-add-get_mtd_device_by_node.patch
+++ /dev/null
@@ -1,75 +0,0 @@
-From 1bd1b740f208d1cf4071932cc51860d37266c402 Mon Sep 17 00:00:00 2001
-From: Bernhard Frauendienst <kernel@nospam.obeliks.de>
-Date: Sat, 1 Sep 2018 00:30:11 +0200
-Subject: [PATCH 495/497] mtd: core: add get_mtd_device_by_node
-
-Add function to retrieve a mtd device by its OF node. Since drivers can
-assign arbitrary names to mtd devices in the absence of a label
-property, there is no other reliable way to retrieve a mtd device for a
-given OF node.
-
-Signed-off-by: Bernhard Frauendienst <kernel@nospam.obeliks.de>
-Reviewed-by: Miquel Raynal <miquel.raynal@bootlin.com>
----
- drivers/mtd/mtdcore.c | 38 ++++++++++++++++++++++++++++++++++++++
- include/linux/mtd/mtd.h | 2 ++
- 2 files changed, 40 insertions(+)
-
---- a/drivers/mtd/mtdcore.c
-+++ b/drivers/mtd/mtdcore.c
-@@ -1053,6 +1053,44 @@ out_unlock:
- }
- EXPORT_SYMBOL_GPL(get_mtd_device_nm);
-
-+/**
-+ * get_mtd_device_by_node - obtain a validated handle for an MTD device
-+ * by of_node
-+ * @of_node: OF node of MTD device to open
-+ *
-+ * This function returns MTD device description structure in case of
-+ * success and an error code in case of failure.
-+ */
-+struct mtd_info *get_mtd_device_by_node(const struct device_node *of_node)
-+{
-+ int err = -ENODEV;
-+ struct mtd_info *mtd = NULL, *other;
-+
-+ mutex_lock(&mtd_table_mutex);
-+
-+ mtd_for_each_device(other) {
-+ if (of_node == other->dev.of_node) {
-+ mtd = other;
-+ break;
-+ }
-+ }
-+
-+ if (!mtd)
-+ goto out_unlock;
-+
-+ err = __get_mtd_device(mtd);
-+ if (err)
-+ goto out_unlock;
-+
-+ mutex_unlock(&mtd_table_mutex);
-+ return mtd;
-+
-+out_unlock:
-+ mutex_unlock(&mtd_table_mutex);
-+ return ERR_PTR(err);
-+}
-+EXPORT_SYMBOL_GPL(get_mtd_device_by_node);
-+
- void put_mtd_device(struct mtd_info *mtd)
- {
- mutex_lock(&mtd_table_mutex);
---- a/include/linux/mtd/mtd.h
-+++ b/include/linux/mtd/mtd.h
-@@ -586,6 +586,8 @@ extern struct mtd_info *get_mtd_device(s
- extern int __get_mtd_device(struct mtd_info *mtd);
- extern void __put_mtd_device(struct mtd_info *mtd);
- extern struct mtd_info *get_mtd_device_nm(const char *name);
-+extern struct mtd_info *get_mtd_device_by_node(
-+ const struct device_node *of_node);
- extern void put_mtd_device(struct mtd_info *mtd);
-
-