diff options
author | Paul Mackerras <paulus@samba.org> | 2008-01-24 00:07:21 +0100 |
---|---|---|
committer | Paul Mackerras <paulus@samba.org> | 2008-01-24 00:07:21 +0100 |
commit | 9156ad48338e0306e508ead5c0d9986050744475 (patch) | |
tree | 37f3a90e38190052ecf3cdf9171dfdddd37b56fd /drivers/spi | |
parent | [POWERPC] Provide a way to protect 4k subpages when using 64k pages (diff) | |
parent | Update ctime and mtime for memory-mapped files (diff) | |
download | linux-9156ad48338e0306e508ead5c0d9986050744475.tar.xz linux-9156ad48338e0306e508ead5c0d9986050744475.zip |
Merge branch 'linux-2.6'
Diffstat (limited to 'drivers/spi')
-rw-r--r-- | drivers/spi/spi_bitbang.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/spi/spi_bitbang.c b/drivers/spi/spi_bitbang.c index 81639c6be1c7..f7f8580edad8 100644 --- a/drivers/spi/spi_bitbang.c +++ b/drivers/spi/spi_bitbang.c @@ -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); @@ -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; } |