struct snd_card *card;
struct snd_pcm *pcm;
struct n64audio *priv;
- struct resource *res;
- int err;
+ int err, irq;
err = snd_card_new(&pdev->dev, SNDRV_DEFAULT_IDX1,
SNDRV_DEFAULT_STR1,
strcpy(card->shortname, "N64 Audio");
strcpy(card->longname, "N64 Audio");
- res = platform_get_resource(pdev, IORESOURCE_IRQ, 0);
- if (!res) {
+ irq = platform_get_irq(pdev, 0);
+ if (irq < 0) {
err = -EINVAL;
goto fail_dma_alloc;
}
- if (devm_request_irq(&pdev->dev, res->start, n64audio_isr,
+ if (devm_request_irq(&pdev->dev, irq, n64audio_isr,
IRQF_SHARED, "N64 Audio", priv)) {
err = -EBUSY;
goto fail_dma_alloc;