File: init.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 (50 lines) | stat: -rw-r--r-- 1,350 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
--- ../alsa-kernel/core/init.c	2006-03-01 22:40:52.000000000 +0100
+++ init.c	2006-03-02 22:35:27.000000000 +0100
@@ -1,3 +1,4 @@
+#define __NO_VERSION__
 /*
  *  Initialization routines
  *  Copyright (c) by Jaroslav Kysela <perex@suse.cz>
@@ -191,11 +192,19 @@
 	return POLLERR | POLLNVAL;
 }
 
+#ifdef CONFIG_SND_HAVE_NEW_IOCTL
 static long snd_disconnect_ioctl(struct file *file,
 				 unsigned int cmd, unsigned long arg)
 {
 	return -ENODEV;
 }
+#else
+static int snd_disconnect_ioctl_old(struct inode *inode, struct file *file,
+				    unsigned int cmd, unsigned long arg)
+{
+	return -ENODEV;
+}
+#endif
 
 static int snd_disconnect_mmap(struct file *file, struct vm_area_struct *vma)
 {
@@ -255,16 +264,22 @@
 		f_ops = &s_f_ops->f_ops;
 
 		memset(f_ops, 0, sizeof(*f_ops));
+#ifndef LINUX_2_2
 		f_ops->owner = file->f_op->owner;
+#endif
 		f_ops->release = file->f_op->release;
 		f_ops->llseek = snd_disconnect_llseek;
 		f_ops->read = snd_disconnect_read;
 		f_ops->write = snd_disconnect_write;
 		f_ops->poll = snd_disconnect_poll;
+#ifdef CONFIG_SND_HAVE_NEW_IOCTL
 		f_ops->unlocked_ioctl = snd_disconnect_ioctl;
 #ifdef CONFIG_COMPAT
 		f_ops->compat_ioctl = snd_disconnect_ioctl;
 #endif
+#else
+		f_ops->ioctl = snd_disconnect_ioctl_old;
+#endif
 		f_ops->mmap = snd_disconnect_mmap;
 		f_ops->fasync = snd_disconnect_fasync;