Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 156045
b: refs/heads/master
c: f0d8367
h: refs/heads/master
i:
  156043: c0c3d66
v: v3
  • Loading branch information
Sebastian Heutling authored and Linus Torvalds committed Jul 30, 2009
1 parent 147385e commit ea278ba
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 096b7fe012d66ed55e98bc8022405ede0cc80e96
refs/heads/master: f0d83679a8d471dc8b646919f70595d6fe8c9606
4 changes: 2 additions & 2 deletions trunk/drivers/misc/eeprom/at25.c
Original file line number Diff line number Diff line change
Expand Up @@ -173,6 +173,7 @@ at25_ee_write(struct at25_data *at25, const char *buf, loff_t off,
unsigned segment;
unsigned offset = (unsigned) off;
u8 *cp = bounce + 1;
int sr;

*cp = AT25_WREN;
status = spi_write(at25->spi, cp, 1);
Expand Down Expand Up @@ -214,7 +215,6 @@ at25_ee_write(struct at25_data *at25, const char *buf, loff_t off,
timeout = jiffies + msecs_to_jiffies(EE_TIMEOUT);
retries = 0;
do {
int sr;

sr = spi_w8r8(at25->spi, AT25_RDSR);
if (sr < 0 || (sr & AT25_SR_nRDY)) {
Expand All @@ -228,7 +228,7 @@ at25_ee_write(struct at25_data *at25, const char *buf, loff_t off,
break;
} while (retries++ < 3 || time_before_eq(jiffies, timeout));

if (time_after(jiffies, timeout)) {
if ((sr < 0) || (sr & AT25_SR_nRDY)) {
dev_err(&at25->spi->dev,
"write %d bytes offset %d, "
"timeout after %u msecs\n",
Expand Down

0 comments on commit ea278ba

Please sign in to comment.