Lines 1660-1670
Link Here
|
1660 |
/* let the kernel option override custom id */ |
1660 |
/* let the kernel option override custom id */ |
1661 |
strncpy(card_id,id[idx],sizeof(card_id)-1); |
1661 |
strncpy(card_id,id[idx],sizeof(card_id)-1); |
1662 |
} |
1662 |
} |
|
|
1663 |
#if ( LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,31) ) |
1664 |
err = snd_card_create(index[idx], card_id/*id[idx]*/, THIS_MODULE, 0, &card); |
1665 |
if (err < 0) { |
1666 |
snd_printk(KERN_WARNING "snd_hdj_chip_create(): cannot create card instance %d\n", idx); |
1667 |
return err; |
1668 |
} |
1669 |
#else |
1663 |
card = snd_card_new(index[idx], card_id/*id[idx]*/, THIS_MODULE, 0); |
1670 |
card = snd_card_new(index[idx], card_id/*id[idx]*/, THIS_MODULE, 0); |
1664 |
if (card == NULL) { |
1671 |
if (card == NULL) { |
1665 |
snd_printk(KERN_WARNING "snd_hdj_chip_create(): cannot create card instance %d\n", idx); |
1672 |
snd_printk(KERN_WARNING "snd_hdj_chip_create(): cannot create card instance %d\n", idx); |
1666 |
return -ENOMEM; |
1673 |
return -ENOMEM; |
1667 |
} |
1674 |
} |
|
|
1675 |
#endif |
1668 |
|
1676 |
|
1669 |
/* save the index, so people who have the card can reference the chip */ |
1677 |
/* save the index, so people who have the card can reference the chip */ |
1670 |
card->private_data = (void*)(unsigned long)idx; |
1678 |
card->private_data = (void*)(unsigned long)idx; |