Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=d52df2e2ea2d881b1439bbdec7f67c27e0f47941
Commit:     d52df2e2ea2d881b1439bbdec7f67c27e0f47941
Parent:     a2b484a29cc9f565b013c0e7f1e0cc22dec12456
Author:     David Brownell <[EMAIL PROTECTED]>
AuthorDate: Tue Jan 8 15:32:40 2008 -0800
Committer:  Linus Torvalds <[EMAIL PROTECTED]>
CommitDate: Tue Jan 8 16:10:35 2008 -0800

    spi_bitbang: always grab lock with irqs blocked
    
    Fix a glitch reported by lockdep in the spi_bitbang code: it needs to
    consistently block IRQs when holding that spinlock.
    
    Signed-off-by: David Brownell <[EMAIL PROTECTED]>
    Signed-off-by: Andrew Morton <[EMAIL PROTECTED]>
    Signed-off-by: Linus Torvalds <[EMAIL PROTECTED]>
---
 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 81639c6..f7f8580 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;
 }
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to