aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/spi
diff options
context:
space:
mode:
authorPaul Mackerras <paulus@samba.org>2008-01-23 18:07:21 -0500
committerPaul Mackerras <paulus@samba.org>2008-01-23 18:07:21 -0500
commit9156ad48338e0306e508ead5c0d9986050744475 (patch)
tree37f3a90e38190052ecf3cdf9171dfdddd37b56fd /drivers/spi
parentfa28237cfcc5827553044cbd6ee52e33692b0faa (diff)
parent8f7b3d156d348b6766833cd4e272d0d19b501e64 (diff)
Merge branch 'linux-2.6'
Diffstat (limited to 'drivers/spi')
-rw-r--r--drivers/spi/spi_bitbang.c5
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)
184 struct spi_bitbang_cs *cs = spi->controller_state; 184 struct spi_bitbang_cs *cs = spi->controller_state;
185 struct spi_bitbang *bitbang; 185 struct spi_bitbang *bitbang;
186 int retval; 186 int retval;
187 unsigned long flags;
187 188
188 bitbang = spi_master_get_devdata(spi->master); 189 bitbang = spi_master_get_devdata(spi->master);
189 190
@@ -222,12 +223,12 @@ int spi_bitbang_setup(struct spi_device *spi)
222 */ 223 */
223 224
224 /* deselect chip (low or high) */ 225 /* deselect chip (low or high) */
225 spin_lock(&bitbang->lock); 226 spin_lock_irqsave(&bitbang->lock, flags);
226 if (!bitbang->busy) { 227 if (!bitbang->busy) {
227 bitbang->chipselect(spi, BITBANG_CS_INACTIVE); 228 bitbang->chipselect(spi, BITBANG_CS_INACTIVE);
228 ndelay(cs->nsecs); 229 ndelay(cs->nsecs);
229 } 230 }
230 spin_unlock(&bitbang->lock); 231 spin_unlock_irqrestore(&bitbang->lock, flags);
231 232
232 return 0; 233 return 0;
233} 234}