blob: e60b1991be7f369e98575db63a7287b8d41c98cc (
plain)
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
|
*** audio.c 2009-04-04 11:53:29.000000000 -0700
--- ../line6usb/audio.c 2009-12-31 12:42:49.827996851 -0800
***************
*** 12,17 ****
--- 12,19 ----
#include "driver.h"
#include "audio.h"
+ #include <linux/version.h>
+
#include <sound/core.h>
#include <sound/initval.h>
***************
*** 28,37 ****
--- 30,48 ----
static int dev;
struct snd_card *card;
+ #if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 30)
card = snd_card_new(line6_index[dev], line6_id[dev], THIS_MODULE, 0);
if (card == NULL)
return -ENOMEM;
+ #else
+ int err;
+
+ err = snd_card_create(line6_index[dev], line6_id[dev], THIS_MODULE, 0,
+ &card);
+ if (err < 0)
+ return err;
+ #endif
line6->card = card;
|