File: seq_clientmgr.patch

package info (click to toggle)
alsa-driver 1.0.13-5etch1
  • links: PTS
  • area: main
  • in suites: etch
  • size: 20,108 kB
  • ctags: 50,477
  • sloc: ansic: 319,881; sh: 32,930; makefile: 2,015; python: 1,527; perl: 1,316; xml: 896; awk: 66
file content (55 lines) | stat: -rw-r--r-- 1,384 bytes parent folder | download | duplicates (2)
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
--- ../../alsa-kernel/core/seq/seq_clientmgr.c	2005-01-20 17:05:45.898256377 +0100
+++ seq_clientmgr.c	2005-01-20 17:06:23.248290799 +0100
@@ -1,3 +1,4 @@
+#define __NO_VERSION__
 /*
  *  ALSA sequencer Client Manager
  *  Copyright (c) 1998-2001 by Frank van de Pol <fvdpol@coil.demon.nl>
@@ -2140,12 +2141,25 @@
 	return snd_seq_do_ioctl(client, cmd, (void __user *) arg);
 }
 
-#ifdef CONFIG_COMPAT
+#if defined(CONFIG_COMPAT) && defined(CONFIG_SND_HAVE_NEW_IOCTL)
 #include "seq_compat.c"
 #else
 #define snd_seq_ioctl_compat	NULL
 #endif
 
+#ifndef CONFIG_SND_HAVE_NEW_IOCTL
+/* need to unlock BKL to allow preemption */
+static int snd_seq_ioctl_old(struct inode *inode, struct file * file,
+			     unsigned int cmd, unsigned long arg)
+{
+	int err;
+	unlock_kernel();
+	err = snd_seq_ioctl(file, cmd, arg);
+	lock_kernel();
+	return err;
+}
+#endif
+
 /* -------------------------------------------------------- */
 
 
@@ -2455,14 +2469,20 @@
 
 static struct file_operations snd_seq_f_ops =
 {
+#ifndef LINUX_2_2
 	.owner =	THIS_MODULE,
+#endif
 	.read =		snd_seq_read,
 	.write =	snd_seq_write,
 	.open =		snd_seq_open,
 	.release =	snd_seq_release,
 	.poll =		snd_seq_poll,
+#ifdef CONFIG_SND_HAVE_NEW_IOCTL
 	.unlocked_ioctl =	snd_seq_ioctl,
 	.compat_ioctl =	snd_seq_ioctl_compat,
+#else
+	.ioctl =	snd_seq_ioctl_old,
+#endif
 };
 
 static struct snd_minor snd_seq_reg =