diff options
| author | Simon Glass <sjg@chromium.org> | 2020-12-19 10:40:00 -0700 |
|---|---|---|
| committer | Simon Glass <sjg@chromium.org> | 2021-01-05 12:24:41 -0700 |
| commit | e2a7cfe9d5fce65789972a31ff50fb1d8d509848 (patch) | |
| tree | 085b2ec36757a215d7f9ed647af5a5c6aa09f149 /include/linux/mtd/mtd.h | |
| parent | a53f6fad7ea20f6ccde21f68e3b44ab7fe8bf6cd (diff) | |
spi: Tidy up get/set of device node
This code is a bit odd in that it only reads and updates the livetree
version of the device ofnode. This means it won't work with flattree.
Update the code to work as it was presumably intended.
Signed-off-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'include/linux/mtd/mtd.h')
| -rw-r--r-- | include/linux/mtd/mtd.h | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/include/linux/mtd/mtd.h b/include/linux/mtd/mtd.h index 1b9151714c..54d03d0240 100644 --- a/include/linux/mtd/mtd.h +++ b/include/linux/mtd/mtd.h @@ -332,15 +332,14 @@ struct mtd_info { }; #if IS_ENABLED(CONFIG_DM) -static inline void mtd_set_of_node(struct mtd_info *mtd, - const struct device_node *np) +static inline void mtd_set_ofnode(struct mtd_info *mtd, ofnode node) { - mtd->dev->node.np = np; + mtd->dev->node = node; } -static inline const struct device_node *mtd_get_of_node(struct mtd_info *mtd) +static inline const ofnode mtd_get_ofnode(struct mtd_info *mtd) { - return mtd->dev->node.np; + return mtd->dev->node; } #else struct device_node; |
