On Mon, 26 Jan 2009 09:56:02 +0100 Takashi Iwai <tiwai@xxxxxxx> wrote: > Thanks, this looks pretty good. > But, one thing I forgot to ask... > > > Could you use the new API snd_card_create() introduced recently? > > The patch with conversion only is below. --- From: Krzysztof Helt <krzysztof.h1@xxxxx> Convert driver to use new snd_card_create() function. Signed-off-by: Krzysztof Helt <krzysztof.h1@xxxxx> --- diff --git a/sound/isa/msnd/msnd_pinnacle.c b/sound/isa/msnd/msnd_pinnacle.c index b0231cf..845470b 100644 --- a/sound/isa/msnd/msnd_pinnacle.c +++ b/sound/isa/msnd/msnd_pinnacle.c @@ -893,10 +893,10 @@ static int __devinit snd_msnd_isa_probe(struct device *pdev, unsigned int idx) return -ENODEV; } - card = snd_card_new(index[idx], id[idx], THIS_MODULE, - sizeof(struct snd_msnd)); - if (!card) - return -ENOMEM; + err = snd_card_create(index[idx], id[idx], THIS_MODULE, + sizeof(struct snd_msnd), &card); + if (err < 0) + return err; snd_card_set_dev(card, pdev); chip = card->private_data; @@ -1113,10 +1113,10 @@ static int __devinit snd_msnd_pnp_detect(struct pnp_card_link *pcard, * Create a new ALSA sound card entry, in anticipation * of detecting our hardware ... */ - card = snd_card_new(index[idx], id[idx], THIS_MODULE, - sizeof(struct snd_msnd)); - if (!card) - return -ENOMEM; + ret = snd_card_create(index[idx], id[idx], THIS_MODULE, + sizeof(struct snd_msnd), &card); + if (ret < 0) + return ret; chip = card->private_data; chip->card = card; ---------------------------------------------------------------------- Speak Up. Angielski szybko i skutecznie. 3 miesiace nauki gratis. Sprawdz. >> http://link.interia.pl/f2019 _______________________________________________ Alsa-devel mailing list Alsa-devel@xxxxxxxxxxxxxxxx http://mailman.alsa-project.org/mailman/listinfo/alsa-devel