From mboxrd@z Thu Jan 1 00:00:00 1970 From: Adrian McMenamin Subject: Re: [Alsa-devel] Re: Patch for AICA sound support on SEGA Dreamcast Date: Sat, 15 Apr 2006 20:34:07 +0100 Message-ID: <1145129647.9504.3.camel@localhost.localdomain> References: <1144075522.11511.20.camel@localhost.localdomain> Mime-Version: 1.0 Content-Type: text/plain Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: Sender: linux-kernel-owner@vger.kernel.org To: Takashi Iwai Cc: Alsa-devel , linux-sh , Paul Mundt , LKML List-Id: alsa-devel@alsa-project.org On Mon, 2006-04-03 at 17:52 +0200, Takashi Iwai wrote: > > +static void __exit aica_exit(void) > > +{ > > + > > + if (likely(dreamcastcard->card)) { > > You don't need such an optimization in this place at all. > > > + snd_aicapcm_free(dreamcastcard); > > + snd_card_free(dreamcastcard->card); > > + kfree(dreamcastcard); > > + if (likely(pd)) { > > + struct device_driver *drv = (&pd->dev)->driver; > > + device_release_driver(&pd->dev); > > + driver_unregister(drv); > > + platform_device_unregister(pd); > > + } > > This should be in remove callback. > What is the remove callback?