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
|
--- ../alsa-kernel/core/hwdep.c 2005-01-20 16:21:56.028228436 +0100
+++ hwdep.c 2005-01-20 16:45:56.583956809 +0100
@@ -303,27 +303,46 @@
return -ENOIOCTLCMD;
}
-#ifdef CONFIG_COMPAT
+#if defined(CONFIG_COMPAT) && defined(CONFIG_SND_HAVE_NEW_IOCTL)
#include "hwdep_compat.c"
#else
#define snd_hwdep_ioctl_compat NULL
#endif
+#ifndef CONFIG_SND_HAVE_NEW_IOCTL
+/* need to unlock BKL to allow preemption */
+static int snd_hwdep_ioctl_old(struct inode *inode, struct file * file,
+ unsigned int cmd, unsigned long arg)
+{
+ int err;
+ unlock_kernel();
+ err = snd_hwdep_ioctl(file, cmd, arg);
+ lock_kernel();
+ return err;
+}
+#endif
+
/*
*/
static struct file_operations snd_hwdep_f_ops =
{
+#ifndef LINUX_2_2
.owner = THIS_MODULE,
+#endif
.llseek = snd_hwdep_llseek,
.read = snd_hwdep_read,
.write = snd_hwdep_write,
.open = snd_hwdep_open,
.release = snd_hwdep_release,
.poll = snd_hwdep_poll,
+#ifdef CONFIG_SND_HAVE_NEW_IOCTL
.unlocked_ioctl = snd_hwdep_ioctl,
.compat_ioctl = snd_hwdep_ioctl_compat,
+#else
+ .ioctl = snd_hwdep_ioctl_old,
+#endif
.mmap = snd_hwdep_mmap,
};
|