当前位置: 技术问答>linux和unix
alsa driver如何註冊一個irq號呢?
来源: 互联网 发布时间:2016-05-30
本文导语: alsa driver如何註冊一個irq號呢? 看一個alsa driver但找不到它怎麼註冊一個irq號的? 有人知道是用哪個function嗎 thx | static int __devinit snd_als300_create(struct snd_card *card, struc...
alsa driver如何註冊一個irq號呢?
看一個alsa driver但找不到它怎麼註冊一個irq號的?
有人知道是用哪個function嗎
thx
看一個alsa driver但找不到它怎麼註冊一個irq號的?
有人知道是用哪個function嗎
thx
|
static int __devinit snd_als300_create(struct snd_card *card,
struct pci_dev *pci, int chip_type,
struct snd_als300 **rchip)
{
struct snd_als300 *chip;
void *irq_handler;
int err;
static struct snd_device_ops ops = {
.dev_free = snd_als300_dev_free,
};
*rchip = NULL;
snd_als300_dbgcallenter();
if ((err = pci_enable_device(pci)) irq = -1;
chip->chip_type = chip_type;
spin_lock_init(&chip->reg_lock);
if ((err = pci_request_regions(pci, "ALS300")) port = pci_resource_start(pci, 0);
if (chip->chip_type == DEVICE_ALS300_PLUS)
irq_handler = snd_als300plus_interrupt;
else
irq_handler = snd_als300_interrupt;
if (request_irq(pci->irq, irq_handler, IRQF_SHARED,
card->shortname, chip)) {
snd_printk(KERN_ERR "unable to grab IRQ %dn", pci->irq);
snd_als300_free(chip);
return -EBUSY;
}
chip->irq = pci->irq;
snd_als300_init(chip);
err = snd_als300_ac97(chip);
if (err