Re: [PATCH 5/6 v5] sound: Add n64 driver

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, 13 Jan 2021 14:47:41 +0100,
Lauri Kasanen wrote:
> 
> This adds support for the Nintendo 64 console's sound.
> 
> Signed-off-by: Lauri Kasanen <cand@xxxxxxx>

It's almost done, but...

> +	strcpy(card->driver, "N64 Audio");
> +	strcpy(card->shortname, "N64 Audio");
> +	strcpy(card->longname, "N64 Audio");
> +
> +	err = snd_card_register(card);
> +	if (err < 0)
> +		goto fail_ioremaps;
> +
> +	res = platform_get_resource(pdev, IORESOURCE_IRQ, 0);
> +	if (request_irq(res->start, n64audio_isr,
> +				IRQF_SHARED, "N64 Audio", priv)) {

Requesting an IRQ should be done before the card registration.
For this particular driver, it's likely OK because it's only for
built-in, but in general snd_card_register() implies that the device
is ready for access from user-space, hence all resources should have
been ready before that point.


thanks,

Takashi



[Index of Archives]     [LKML Archive]     [Linux ARM Kernel]     [Linux ARM]     [Git]     [Yosemite News]     [Linux SCSI]     [Linux Hams]

  Powered by Linux