mirror of
https://github.com/dguglielmi/sunny-overlay.git
synced 2025-12-06 16:02:39 +01:00
24 lines
931 B
Diff
24 lines
931 B
Diff
diff -Naru hdjmod-1.28o/device.c hdjmod-1.28/device.c
|
|
--- hdjmod-1.28o/device.c 2009-01-27 15:25:50.000000000 +0100
|
|
+++ hdjmod-1.28/device.c 2010-02-06 16:20:36.901740173 +0100
|
|
@@ -1660,11 +1660,19 @@
|
|
/* let the kernel option override custom id */
|
|
strncpy(card_id,id[idx],sizeof(card_id)-1);
|
|
}
|
|
+#if ( LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,30) )
|
|
+ err = snd_card_create(index[idx], card_id/*id[idx]*/, THIS_MODULE, 0, &card );
|
|
+ if (err) {
|
|
+ snd_printk(KERN_WARNING "snd_hdj_chip_create(): cannot create card instance %d\n", idx);
|
|
+ return err;
|
|
+ }
|
|
+#else
|
|
card = snd_card_new(index[idx], card_id/*id[idx]*/, THIS_MODULE, 0);
|
|
if (card == NULL) {
|
|
snd_printk(KERN_WARNING "snd_hdj_chip_create(): cannot create card instance %d\n", idx);
|
|
return -ENOMEM;
|
|
}
|
|
+#endif
|
|
|
|
/* save the index, so people who have the card can reference the chip */
|
|
card->private_data = (void*)(unsigned long)idx;
|