From patchwork Mon Mar 9 12:30:44 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Takashi Iwai X-Patchwork-Id: 5966681 Return-Path: X-Original-To: patchwork-alsa-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 6BC9B9F318 for ; Mon, 9 Mar 2015 12:31:11 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id CCD0520260 for ; Mon, 9 Mar 2015 12:31:07 +0000 (UTC) Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) by mail.kernel.org (Postfix) with ESMTP id C556E20148 for ; Mon, 9 Mar 2015 12:31:03 +0000 (UTC) Received: by alsa0.perex.cz (Postfix, from userid 1000) id 028AB2606A0; Mon, 9 Mar 2015 13:31:02 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 Received: from alsa0.perex.cz (localhost [IPv6:::1]) by alsa0.perex.cz (Postfix) with ESMTP id 913732605E9; Mon, 9 Mar 2015 13:30:54 +0100 (CET) X-Original-To: alsa-devel@alsa-project.org Delivered-To: alsa-devel@alsa-project.org Received: by alsa0.perex.cz (Postfix, from userid 1000) id B77902605E9; Mon, 9 Mar 2015 13:30:53 +0100 (CET) Received: from mx2.suse.de (cantor2.suse.de [195.135.220.15]) by alsa0.perex.cz (Postfix) with ESMTP id C6D9B2605E9 for ; Mon, 9 Mar 2015 13:30:46 +0100 (CET) X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay1.suse.de (charybdis-ext.suse.de [195.135.220.254]) by mx2.suse.de (Postfix) with ESMTP id 5E6C3AAC9; Mon, 9 Mar 2015 12:30:45 +0000 (UTC) Date: Mon, 09 Mar 2015 13:30:44 +0100 Message-ID: From: Takashi Iwai To: Fengguang Wu In-Reply-To: <20150307105844.GA24355@wfg-t540p.sh.intel.com> References: <20150307105844.GA24355@wfg-t540p.sh.intel.com> User-Agent: Wanderlust/2.15.9 (Almost Unreal) SEMI/1.14.6 (Maruoka) FLIM/1.14.9 (=?UTF-8?B?R29qxY0=?=) APEL/10.8 Emacs/24.4 (x86_64-suse-linux-gnu) MULE/6.0 (HANACHIRUSATO) MIME-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Cc: alsa-devel@alsa-project.org, LKP , linux-kernel@vger.kernel.org Subject: Re: [alsa-devel] [ALSA/hda] kernel BUG at drivers/base/driver.c:152! X-BeenThere: alsa-devel@alsa-project.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: alsa-devel-bounces@alsa-project.org Sender: alsa-devel-bounces@alsa-project.org X-Virus-Scanned: ClamAV using ClamSMTP At Sat, 7 Mar 2015 18:58:44 +0800, Fengguang Wu wrote: > > Greetings, > > 0day kernel testing robot got the below dmesg and the first bad commit is > > git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound.git topic/hda-regmap > > commit 3103d80b8a89f1797e87d7265f9b389a0db4ccd8 > Author: Takashi Iwai > AuthorDate: Tue Feb 17 21:46:37 2015 +0100 > Commit: Takashi Iwai > CommitDate: Tue Mar 3 14:35:44 2015 +0100 > > ALSA: hda - Make snd_hda_bus_type public > > Define the common hd-audio driver and device types to bind over > snd_hda_bus_type publicly. This allows to implement other type of > device and driver code over hd-audio bus. > > Now both struct hda_codec and struct hda_codec_driver inherit these > new struct hdac_device and struct hdac_driver, respectively. > > Signed-off-by: Takashi Iwai Fixed by the patch below now. Thanks! Takashi -- 8< -- From: Takashi Iwai Subject: [PATCH] ALSA: hda - Fix panic at booting with built-in HDA driver The split of hdaudio bus type caused a kernel panic at booting when the HD-audio driver is built into kernel, because of the insufficient init call order. This patch changes the module_init() to subsys_initcall() to assure the bus type registration done before any other driver registrations. Reported-by: Fengguang Wu Signed-off-by: Takashi Iwai --- sound/hda/hda_bus_type.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sound/hda/hda_bus_type.c b/sound/hda/hda_bus_type.c index 996515c6a248..519914a12e8a 100644 --- a/sound/hda/hda_bus_type.c +++ b/sound/hda/hda_bus_type.c @@ -38,5 +38,5 @@ static void __exit hda_bus_exit(void) bus_unregister(&snd_hda_bus_type); } -module_init(hda_bus_init); +subsys_initcall(hda_bus_init); module_exit(hda_bus_exit);