diff options
author | Matthias Kaehlcke <matthias.kaehlcke@gmail.com> | 2007-05-08 00:32:38 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-05-08 11:15:16 -0700 |
commit | 635244c59c27d3b22c4523d2a951cf553195a966 (patch) | |
tree | 21e49799d046275f51efdb2a0c03fd3f97074858 /drivers/isdn | |
parent | 13af68ee335d4d26ef96a133abc94b2ef051be00 (diff) | |
download | kernel_samsung_crespo-635244c59c27d3b22c4523d2a951cf553195a966.zip kernel_samsung_crespo-635244c59c27d3b22c4523d2a951cf553195a966.tar.gz kernel_samsung_crespo-635244c59c27d3b22c4523d2a951cf553195a966.tar.bz2 |
fix spinlock usage in hysdn_log_close()
Fix incorrect spinlock use in hysdn_log_close(). The function declared a
spinlock on the stack and used it to 'protect' a shared driver structure.
The patch simply removes the useless code.
Signed-off-by: Matthias Kaehlcke <matthias.kaehlcke@gmail.com>
Cc: Karsten Keil <kkeil@suse.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'drivers/isdn')
-rw-r--r-- | drivers/isdn/hysdn/hysdn_proclog.c | 4 |
1 files changed, 0 insertions, 4 deletions
diff --git a/drivers/isdn/hysdn/hysdn_proclog.c b/drivers/isdn/hysdn/hysdn_proclog.c index 4c7deda..27b3991 100644 --- a/drivers/isdn/hysdn/hysdn_proclog.c +++ b/drivers/isdn/hysdn/hysdn_proclog.c @@ -297,8 +297,6 @@ hysdn_log_close(struct inode *ino, struct file *filep) struct procdata *pd; hysdn_card *card; int retval = 0; - unsigned long flags; - spinlock_t hysdn_lock = SPIN_LOCK_UNLOCKED; lock_kernel(); if ((filep->f_mode & (FMODE_READ | FMODE_WRITE)) == FMODE_WRITE) { @@ -308,7 +306,6 @@ hysdn_log_close(struct inode *ino, struct file *filep) /* read access -> log/debug read, mark one further file as closed */ pd = NULL; - spin_lock_irqsave(&hysdn_lock, flags); inf = *((struct log_data **) filep->private_data); /* get first log entry */ if (inf) pd = (struct procdata *) inf->proc_ctrl; /* still entries there */ @@ -331,7 +328,6 @@ hysdn_log_close(struct inode *ino, struct file *filep) inf->usage_cnt--; /* decrement usage count for buffers */ inf = inf->next; } - spin_unlock_irqrestore(&hysdn_lock, flags); if (pd) if (pd->if_used <= 0) /* delete buffers if last file closed */ |