From: Fabio Estevam <festevam@gmail.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH] spi: spi_flash: Fix the arguments of stm_is_locked_sr()
Date: Tue, 5 Jan 2016 22:24:39 -0200 [thread overview]
Message-ID: <1452039879-13727-1-git-send-email-festevam@gmail.com> (raw)
From: Fabio Estevam <fabio.estevam@nxp.com>
stm_is_locked_sr() takes the status register (SR) value as the last
parameter, not the second.
Based on a patch from Brian Norris for the linux kernel:
http://git.infradead.org/linux-mtd.git/commitdiff/a32d5b726ff8cf32bf491522b0ac8ae2545a063e?hp=67b9bcd36906e12a15ffec19463afbbd6a41660e
Signed-off-by: Fabio Estevam <fabio.estevam@nxp.com>
---
drivers/mtd/spi/spi_flash.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/mtd/spi/spi_flash.c b/drivers/mtd/spi/spi_flash.c
index 7ffa136..b7b7f00 100644
--- a/drivers/mtd/spi/spi_flash.c
+++ b/drivers/mtd/spi/spi_flash.c
@@ -767,8 +767,8 @@ int stm_unlock(struct spi_flash *flash, u32 ofs, size_t len)
return ret;
/* Cannot unlock; would unlock larger region than requested */
- if (stm_is_locked_sr(flash, status_old, ofs - flash->erase_size,
- flash->erase_size))
+ if (stm_is_locked_sr(flash, ofs - flash->erase_size, flash->erase_size,
+ status_old))
return -EINVAL;
/*
* Need largest pow such that:
--
1.9.1
next reply other threads:[~2016-01-06 0:24 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-01-06 0:24 Fabio Estevam [this message]
2016-01-07 12:18 ` [U-Boot] [PATCH] spi: spi_flash: Fix the arguments of stm_is_locked_sr() Jagan Teki
2016-01-07 13:27 ` Fabio Estevam
2016-01-07 14:47 ` Jagan Teki
2016-01-07 14:49 ` Fabio Estevam
2016-01-07 15:01 ` Jagan Teki
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1452039879-13727-1-git-send-email-festevam@gmail.com \
--to=festevam@gmail.com \
--cc=u-boot@lists.denx.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox