1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56
|
--- ../../../alsa-kernel/core/seq/oss/seq_oss.c 2005-01-20 16:21:56.113212624 +0100
+++ seq_oss.c 2005-01-20 17:07:37.445453736 +0100
@@ -186,12 +186,25 @@
return snd_seq_oss_ioctl(dp, cmd, arg);
}
-#ifdef CONFIG_COMPAT
+#if defined(CONFIG_COMPAT) && defined(CONFIG_SND_HAVE_NEW_IOCTL)
#define odev_ioctl_compat odev_ioctl
#else
#define odev_ioctl_compat NULL
#endif
+#ifndef CONFIG_SND_HAVE_NEW_IOCTL
+/* need to unlock BKL to allow preemption */
+static int odev_ioctl_old(struct inode *inode, struct file * file,
+ unsigned int cmd, unsigned long arg)
+{
+ int err;
+ unlock_kernel();
+ err = odev_ioctl(file, cmd, arg);
+ lock_kernel();
+ return err;
+}
+#endif
+
static unsigned int
odev_poll(struct file *file, poll_table * wait)
{
@@ -207,14 +220,20 @@
static struct file_operations seq_oss_f_ops =
{
+#ifndef LINUX_2_2
.owner = THIS_MODULE,
+#endif
.read = odev_read,
.write = odev_write,
.open = odev_open,
.release = odev_release,
.poll = odev_poll,
+#ifdef CONFIG_SND_HAVE_NEW_IOCTL
.unlocked_ioctl = odev_ioctl,
.compat_ioctl = odev_ioctl_compat,
+#else
+ .ioctl = odev_ioctl_old,
+#endif
};
static struct snd_minor seq_oss_reg = {
@@ -315,3 +334,5 @@
info_entry = NULL;
}
#endif /* CONFIG_PROC_FS */
+
+EXPORT_NO_SYMBOLS;
|