Commit 65f37b79 authored by Jonathan Corbet's avatar Jonathan Corbet

dsp56k: BKL pushdown

Put explicit lock_kernel calls into dsp56k_open().

[Stupid missing label error fixed]
Signed-off-by: default avatarJonathan Corbet <corbet@lwn.net>
parent c0bed680
...@@ -33,6 +33,7 @@ ...@@ -33,6 +33,7 @@
#include <linux/mm.h> #include <linux/mm.h>
#include <linux/init.h> #include <linux/init.h>
#include <linux/device.h> #include <linux/device.h>
#include <linux/smp_lock.h>
#include <asm/atarihw.h> #include <asm/atarihw.h>
#include <asm/traps.h> #include <asm/traps.h>
...@@ -436,13 +437,17 @@ static unsigned int dsp56k_poll(struct file *file, poll_table *wait) ...@@ -436,13 +437,17 @@ static unsigned int dsp56k_poll(struct file *file, poll_table *wait)
static int dsp56k_open(struct inode *inode, struct file *file) static int dsp56k_open(struct inode *inode, struct file *file)
{ {
int dev = iminor(inode) & 0x0f; int dev = iminor(inode) & 0x0f;
int ret = 0;
lock_kernel();
switch(dev) switch(dev)
{ {
case DSP56K_DEV_56001: case DSP56K_DEV_56001:
if (test_and_set_bit(0, &dsp56k.in_use)) if (test_and_set_bit(0, &dsp56k.in_use)) {
return -EBUSY; ret = -EBUSY;
goto out;
}
dsp56k.timeout = TIMEOUT; dsp56k.timeout = TIMEOUT;
dsp56k.maxio = MAXIO; dsp56k.maxio = MAXIO;
...@@ -458,10 +463,11 @@ static int dsp56k_open(struct inode *inode, struct file *file) ...@@ -458,10 +463,11 @@ static int dsp56k_open(struct inode *inode, struct file *file)
break; break;
default: default:
return -ENODEV; ret = -ENODEV;
} }
out:
return 0; unlock_kernel();
return ret;
} }
static int dsp56k_release(struct inode *inode, struct file *file) static int dsp56k_release(struct inode *inode, struct file *file)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment