From patchwork Thu Apr 30 14:52:35 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vinod Koul X-Patchwork-Id: 6304621 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 4EEFC9F1C2 for ; Thu, 30 Apr 2015 14:52:45 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 8A5DE201EC for ; Thu, 30 Apr 2015 14:52:44 +0000 (UTC) Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) by mail.kernel.org (Postfix) with ESMTP id 90F54201BB for ; Thu, 30 Apr 2015 14:52:43 +0000 (UTC) Received: by alsa0.perex.cz (Postfix, from userid 1000) id B263C265DEE; Thu, 30 Apr 2015 16:52:42 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Spam-Level: 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 CCF8F261AA3; Thu, 30 Apr 2015 16:52:14 +0200 (CEST) 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 46B55264F4B; Thu, 30 Apr 2015 16:52:11 +0200 (CEST) Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) by alsa0.perex.cz (Postfix) with ESMTP id EC775261A0D for ; Thu, 30 Apr 2015 16:52:03 +0200 (CEST) Received: from orsmga003.jf.intel.com ([10.7.209.27]) by orsmga103.jf.intel.com with ESMTP; 30 Apr 2015 07:52:03 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.11,677,1422950400"; d="scan'208";a="564317780" Received: from unknown (HELO vkoul-udesk7.iind.intel.com) ([10.223.84.34]) by orsmga003.jf.intel.com with ESMTP; 30 Apr 2015 07:52:01 -0700 From: Vinod Koul To: alsa-devel@alsa-project.org Date: Thu, 30 Apr 2015 20:22:35 +0530 Message-Id: <1430405556-19166-2-git-send-email-vinod.koul@intel.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1430405556-19166-1-git-send-email-vinod.koul@intel.com> References: <1430405556-19166-1-git-send-email-vinod.koul@intel.com> Cc: liam.r.girdwood@linux.intel.com, tiwai@suse.de, broonie@kernel.org, Vinod Koul , patches.audio@intel.com Subject: [alsa-devel] [PATCH 2/3] ALSA: hda: remove module_pci_driver 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: , MIME-Version: 1.0 Errors-To: alsa-devel-bounces@alsa-project.org Sender: alsa-devel-bounces@alsa-project.org X-Virus-Scanned: ClamAV using ClamSMTP Since we want to selectively register for Intel aDSP systems based on the module flag we need to bring back explicit code for driver registration and remove module_pci_driver Signed-off-by: Vinod Koul --- sound/pci/hda/hda_intel.c | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/sound/pci/hda/hda_intel.c b/sound/pci/hda/hda_intel.c index f7cdf4d2e24e..488dab208ddc 100644 --- a/sound/pci/hda/hda_intel.c +++ b/sound/pci/hda/hda_intel.c @@ -2217,4 +2217,19 @@ static struct pci_driver azx_driver = { }, }; -module_pci_driver(azx_driver); +static int __init azx_module_init(void) +{ + int ret; + + ret = pci_register_driver(&azx_driver); + + return ret; +} +module_init(azx_module_init); + +static void __exit azx_module_exit(void) +{ + pci_unregister_driver(&azx_driver); + +} +module_exit(azx_module_exit);