From: Takashi Iwai Subject: Re: [PATCH] alsa: use subsys_initcall for sound core instead of module_init Date: Wed, 13 Jan 2010 07:48:07 +0100 Message-ID: References: <1263334840-6118-1-git-send-email-cascardo@holoscopio.com> Mime-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mx1.suse.de (cantor.suse.de [195.135.220.2]) by alsa0.perex.cz (Postfix) with ESMTP id 3311D103842 for ; Wed, 13 Jan 2010 07:48:10 +0100 (CET) In-Reply-To: <1263334840-6118-1-git-send-email-cascardo@holoscopio.com> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: alsa-devel-bounces@alsa-project.org Errors-To: alsa-devel-bounces@alsa-project.org To: Thadeu Lima de Souza Cascardo Cc: alsa-devel@alsa-project.org, ibm-acpi@hmh.eng.br, linux-kernel@vger.kernel.org List-Id: alsa-devel@alsa-project.org At Tue, 12 Jan 2010 20:20:39 -0200, Thadeu Lima de Souza Cascardo wrote: > > This is needed for built-in drivers which are built before the sound directory, > like thinkpad_acpi. > > Otherwise, registering a card fails. Oh well, this kind of problem hits again. I don't remember why subsys_init() wasn't taken before... Maybe some dependency between sound and V4L or so. But, it's worth to check again. I'll apply this after some testing. thanks, Takashi > > Signed-off-by: Thadeu Lima de Souza Cascardo > --- > sound/core/sound.c | 4 ++-- > sound/sound_core.c | 2 +- > 2 files changed, 3 insertions(+), 3 deletions(-) > > diff --git a/sound/core/sound.c b/sound/core/sound.c > index 7872a02..563d196 100644 > --- a/sound/core/sound.c > +++ b/sound/core/sound.c > @@ -468,5 +468,5 @@ static void __exit alsa_sound_exit(void) > unregister_chrdev(major, "alsa"); > } > > -module_init(alsa_sound_init) > -module_exit(alsa_sound_exit) > +subsys_initcall(alsa_sound_init); > +module_exit(alsa_sound_exit); > diff --git a/sound/sound_core.c b/sound/sound_core.c > index dbca7c9..7c2d677 100644 > --- a/sound/sound_core.c > +++ b/sound/sound_core.c > @@ -61,7 +61,7 @@ static void __exit cleanup_soundcore(void) > class_destroy(sound_class); > } > > -module_init(init_soundcore); > +subsys_initcall(init_soundcore); > module_exit(cleanup_soundcore); > > > -- > 1.6.6 >