diff options
author | Ingo Korb <ml@akana.de> | 2007-07-17 04:05:23 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-07-17 10:23:10 -0700 |
commit | b306122df9f9dbec7751133073b4d19b9197d22e (patch) | |
tree | 4f580370b4c025f3b6136ca15a2d8338bbbf27d6 /drivers/char/istallion.c | |
parent | 186797ce330867b4c3609e503d2fee2fc6940954 (diff) | |
download | kernel_samsung_crespo-b306122df9f9dbec7751133073b4d19b9197d22e.zip kernel_samsung_crespo-b306122df9f9dbec7751133073b4d19b9197d22e.tar.gz kernel_samsung_crespo-b306122df9f9dbec7751133073b4d19b9197d22e.tar.bz2 |
Char: istallion, init+locking fixes
Move brdp->iosize assignment in stli_initecp up a few lines to stop the
driver from requesting an I/O region of length 0.
Remove spin_lock_irqsave/spin_unlock_irqrestore from __stli_sendcmd as
all users of that function take the lock already.
Signed-off-by: Ingo Korb <ml@akana.de>
Cc: Jiri Slaby <jirislaby@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'drivers/char/istallion.c')
-rw-r--r-- | drivers/char/istallion.c | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/drivers/char/istallion.c b/drivers/char/istallion.c index 8094099..3c66f40 100644 --- a/drivers/char/istallion.c +++ b/drivers/char/istallion.c @@ -2163,14 +2163,10 @@ static void __stli_sendcmd(struct stlibrd *brdp, struct stliport *portp, unsigne cdkhdr_t __iomem *hdrp; cdkctrl_t __iomem *cp; unsigned char __iomem *bits; - unsigned long flags; - - spin_lock_irqsave(&brd_lock, flags); if (test_bit(ST_CMDING, &portp->state)) { printk(KERN_ERR "STALLION: command already busy, cmd=%x!\n", (int) cmd); - spin_unlock_irqrestore(&brd_lock, flags); return; } @@ -2191,7 +2187,6 @@ static void __stli_sendcmd(struct stlibrd *brdp, struct stliport *portp, unsigne writeb(readb(bits) | portp->portbit, bits); set_bit(ST_CMDING, &portp->state); EBRDDISABLE(brdp); - spin_unlock_irqrestore(&brd_lock, flags); } static void stli_sendcmd(struct stlibrd *brdp, struct stliport *portp, unsigned long cmd, void *arg, int size, int copyback) @@ -3215,13 +3210,13 @@ static int stli_initecp(struct stlibrd *brdp) goto err; } + brdp->iosize = ECP_IOSIZE; + if (!request_region(brdp->iobase, brdp->iosize, "istallion")) { retval = -EIO; goto err; } - brdp->iosize = ECP_IOSIZE; - /* * Based on the specific board type setup the common vars to access * and enable shared memory. Set all board specific information now |