aboutsummaryrefslogtreecommitdiff
path: root/include/linux/mtd/spi-nor.h
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2020-12-19 10:40:00 -0700
committerSimon Glass <sjg@chromium.org>2021-01-05 12:24:41 -0700
commite2a7cfe9d5fce65789972a31ff50fb1d8d509848 (patch)
tree085b2ec36757a215d7f9ed647af5a5c6aa09f149 /include/linux/mtd/spi-nor.h
parenta53f6fad7ea20f6ccde21f68e3b44ab7fe8bf6cd (diff)
downloadu-boot-e2a7cfe9d5fce65789972a31ff50fb1d8d509848.zip
u-boot-e2a7cfe9d5fce65789972a31ff50fb1d8d509848.tar.gz
u-boot-e2a7cfe9d5fce65789972a31ff50fb1d8d509848.tar.bz2
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/spi-nor.h')
-rw-r--r--include/linux/mtd/spi-nor.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/include/linux/mtd/spi-nor.h b/include/linux/mtd/spi-nor.h
index 233fdc3..2642bf9 100644
--- a/include/linux/mtd/spi-nor.h
+++ b/include/linux/mtd/spi-nor.h
@@ -352,6 +352,7 @@ struct spi_nor {
u32 erase_size;
};
+#ifndef __UBOOT__
static inline void spi_nor_set_flash_node(struct spi_nor *nor,
const struct device_node *np)
{
@@ -363,6 +364,7 @@ device_node *spi_nor_get_flash_node(struct spi_nor *nor)
{
return mtd_get_of_node(&nor->mtd);
}
+#endif /* __UBOOT__ */
/**
* struct spi_nor_hwcaps - Structure for describing the hardware capabilies