File: tumbler.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 (43 lines) | stat: -rw-r--r-- 1,079 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
--- ../alsa-kernel/ppc/tumbler.c	2005-11-17 16:33:55.000000000 +0100
+++ tumbler.c	2006-01-04 13:07:30.000000000 +0100
@@ -1,3 +1,4 @@
+#define __NO_VERSION__
 /*
  * PMac Tumbler/Snapper lowlevel functions
  *
@@ -940,7 +941,11 @@
 	}
 }
 
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0)
+static struct tq_struct device_change;
+#else
 static struct work_struct device_change;
+#endif
 
 static void device_change_handler(void *self)
 {
@@ -1009,7 +1014,11 @@
 		mix = chip->mixer_data;
 		snd_assert(mix, return);
 		mix->auto_mute_notify = do_notify;
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0)
+		schedule_task(&device_change);
+#else
 		schedule_work(&device_change);
+#endif
 	}
 }
 #endif /* PMAC_SUPPORT_AUTOMUTE */
@@ -1416,7 +1425,11 @@
 	chip->resume = tumbler_resume;
 #endif
 
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0)
+	INIT_TQUEUE(&device_change, device_change_handler, (void *)chip);
+#else
 	INIT_WORK(&device_change, device_change_handler, (void *)chip);
+#endif
 
 #ifdef PMAC_SUPPORT_AUTOMUTE
 	if ((mix->headphone_irq >=0 || mix->lineout_irq >= 0)