Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 75299
b: refs/heads/master
c: d52df2e
h: refs/heads/master
i:
  75297: 826f51c
  75295: 52538ef
v: v3
  • Loading branch information
David Brownell authored and Linus Torvalds committed Jan 9, 2008
1 parent b3a60bb commit 4a6fef5
Show file tree
Hide file tree
Showing 2 changed files with 4 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: a2b484a29cc9f565b013c0e7f1e0cc22dec12456
refs/heads/master: d52df2e2ea2d881b1439bbdec7f67c27e0f47941
5 changes: 3 additions & 2 deletions trunk/drivers/spi/spi_bitbang.c
Original file line number Diff line number Diff line change
Expand Up @@ -184,6 +184,7 @@ int spi_bitbang_setup(struct spi_device *spi)
struct spi_bitbang_cs *cs = spi->controller_state;
struct spi_bitbang *bitbang;
int retval;
unsigned long flags;

bitbang = spi_master_get_devdata(spi->master);

Expand Down Expand Up @@ -222,12 +223,12 @@ int spi_bitbang_setup(struct spi_device *spi)
*/

/* deselect chip (low or high) */
spin_lock(&bitbang->lock);
spin_lock_irqsave(&bitbang->lock, flags);
if (!bitbang->busy) {
bitbang->chipselect(spi, BITBANG_CS_INACTIVE);
ndelay(cs->nsecs);
}
spin_unlock(&bitbang->lock);
spin_unlock_irqrestore(&bitbang->lock, flags);

return 0;
}
Expand Down

0 comments on commit 4a6fef5

Please sign in to comment.