diff options
author | Victor Shyba <victor1984@riseup.net> | 2016-12-20 05:19:08 -0300 |
---|---|---|
committer | Mathias Kresin <dev@kresin.me> | 2017-01-03 19:58:00 +0100 |
commit | d6c831e0e5a0ef97eb054dd3eb382d66b1bffc40 (patch) | |
tree | b5723cc59f2456cbda62eeee4556c8cf88b7c50f /target/linux/layerscape/patches-4.4/1085-mtd-spi-nor-Check-the-return-value-from-read_sr.patch | |
parent | 799d0dddf608ff012b49282d5832ddd2ef1b916e (diff) | |
download | upstream-d6c831e0e5a0ef97eb054dd3eb382d66b1bffc40.tar.gz upstream-d6c831e0e5a0ef97eb054dd3eb382d66b1bffc40.tar.bz2 upstream-d6c831e0e5a0ef97eb054dd3eb382d66b1bffc40.zip |
generic: mtd: backport SPI_NOR_HAS_LOCK
This flag was added to 4.9 with upstream commit
76a4707de5e18dc32d9cb4e990686140c5664a15.
Signed-off-by: Victor Shyba <victor1984@riseup.net>
[refresh and adjust platform patches, fix commit message]
Signed-off-by: Mathias Kresin <dev@kresin.me>
Diffstat (limited to 'target/linux/layerscape/patches-4.4/1085-mtd-spi-nor-Check-the-return-value-from-read_sr.patch')
-rw-r--r-- | target/linux/layerscape/patches-4.4/1085-mtd-spi-nor-Check-the-return-value-from-read_sr.patch | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/target/linux/layerscape/patches-4.4/1085-mtd-spi-nor-Check-the-return-value-from-read_sr.patch b/target/linux/layerscape/patches-4.4/1085-mtd-spi-nor-Check-the-return-value-from-read_sr.patch index 96d9309e4b..cca7ac1797 100644 --- a/target/linux/layerscape/patches-4.4/1085-mtd-spi-nor-Check-the-return-value-from-read_sr.patch +++ b/target/linux/layerscape/patches-4.4/1085-mtd-spi-nor-Check-the-return-value-from-read_sr.patch @@ -17,7 +17,7 @@ Integrated-by: Jiang Yutang <yutang.jiang@nxp.com> --- a/drivers/mtd/spi-nor/spi-nor.c +++ b/drivers/mtd/spi-nor/spi-nor.c -@@ -478,11 +478,13 @@ static int stm_is_locked_sr(struct spi_n +@@ -479,11 +479,13 @@ static int stm_is_locked_sr(struct spi_n static int stm_lock(struct spi_nor *nor, loff_t ofs, uint64_t len) { struct mtd_info *mtd = &nor->mtd; @@ -32,7 +32,7 @@ Integrated-by: Jiang Yutang <yutang.jiang@nxp.com> /* SPI NOR always locks to the end */ if (ofs + len != mtd->size) { -@@ -528,11 +530,13 @@ static int stm_lock(struct spi_nor *nor, +@@ -529,11 +531,13 @@ static int stm_lock(struct spi_nor *nor, static int stm_unlock(struct spi_nor *nor, loff_t ofs, uint64_t len) { struct mtd_info *mtd = &nor->mtd; @@ -47,7 +47,7 @@ Integrated-by: Jiang Yutang <yutang.jiang@nxp.com> /* Cannot unlock; would unlock larger region than requested */ if (stm_is_locked_sr(nor, ofs - mtd->erasesize, mtd->erasesize, -@@ -1037,6 +1041,8 @@ static int macronix_quad_enable(struct s +@@ -1038,6 +1042,8 @@ static int macronix_quad_enable(struct s int ret, val; val = read_sr(nor); |