Re: [2.5.58][PnP] Some small points.

From: Ruslan U. Zakirov (cubic@miee.ru)
Date: Sat Jan 18 2003 - 19:34:07 EST


On Sat, 18 Jan 2003, Jaroslav Kysela wrote:

> On Fri, 17 Jan 2003, Adam Belay wrote:
>
> > > 4) Have we got ALSA driver that work absolutly and use PnP layer in
> > > right ways?
> >
> > I believe Jaroslav is working on that now. Jaroslav, if you would like me to
> > convert ALSA drivers please let me know.
>
> I'm working on it. Your converted drivers still misses one feature: force
> resources via module options. Two complete drivers using configuration
> templates follow.
>
[snip]
> -static void snd_opl3sa2_isapnp_remove(struct pnp_card * card)
> +static void __devexit snd_opl3sa2_isapnp_remove(struct pnp_card * pcard)
> {
> -/* FIXME */
> + snd_card_t * card = (snd_card_t *) pnpc_get_drvdata(pcard);
> +
> + snd_card_disconnect(card);
> + snd_card_free_in_thread(card);
> }
[snip]
> static void __exit alsa_card_opl3sa2_exit(void)
> {
> - int idx;
> + int dev;
>
> - for (idx = 0; idx < SNDRV_CARDS; idx++)
> - snd_card_free(snd_opl3sa2_cards[idx]);
> + pnpc_unregister_driver(&opl3sa2_pnpc_driver);
> + for (dev = 0; dev < SNDRV_CARDS; dev++)
> + snd_card_free(snd_opl3sa2_cards[dev]);
> }
Hello Jaroslav and other.
I could be wrong.
1) It's cause an compilation error without CONFIG_PNP.
2) We can delete call of snd_card_free in module exit function, it'll be
freed within driver->remove call. It's realy needed only without
CONFIG_PNP_CARD.
Thanks for example of driver, I've understood some tricks from it.
        Best regards, Ruslan.

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Thu Jan 23 2003 - 22:00:20 EST