summaryrefslogtreecommitdiffstats
path: root/spi25.c
diff options
context:
space:
mode:
authorEdward O'Callaghan <quasisec@google.com>2020-10-30 11:32:28 +1100
committerEdward O'Callaghan <quasisec@chromium.org>2020-10-31 12:14:40 +0000
commit53a99cdbc90fd3296f2d6afa649c39a52bdb20a3 (patch)
tree09484e1e4b1919b22b327bc61d646c598479ff59 /spi25.c
parentdd81c9aa66b6ff0081493db719c9512d6e65650d (diff)
downloadflashrom-53a99cdbc90fd3296f2d6afa649c39a52bdb20a3.tar.gz
flashrom-53a99cdbc90fd3296f2d6afa649c39a52bdb20a3.tar.bz2
flashrom-53a99cdbc90fd3296f2d6afa649c39a52bdb20a3.zip
spi25.c: Use define const in spi_simple_write_cmd() fn
This uses the JEDEC_WREN_OUTSIZE define in the spi_simple_write_cmd() helper function to improve readability. BUG=none BRANCH=none TEST=builds same object Change-Id: I1b5ede4435ba014320fa8cf9490dc23cdfba4fd6 Signed-off-by: Edward O'Callaghan <quasisec@google.com> Reviewed-on: https://review.coreboot.org/c/flashrom/+/47004 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Shiyu Sun <sshiyu@google.com> Reviewed-by: Angel Pons <th3fanbus@gmail.com>
Diffstat (limited to 'spi25.c')
-rw-r--r--spi25.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/spi25.c b/spi25.c
index dd4543d38..1e797c846 100644
--- a/spi25.c
+++ b/spi25.c
@@ -325,7 +325,7 @@ static int spi_simple_write_cmd(struct flashctx *const flash, const uint8_t op,
struct spi_command cmds[] = {
{
.readarr = 0,
- .writecnt = 1,
+ .writecnt = JEDEC_WREN_OUTSIZE,
.writearr = (const unsigned char[]){ JEDEC_WREN },
}, {
.readarr = 0,