From patchwork Thu May 17 16:38:57 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mark Brown X-Patchwork-Id: 10407177 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id C4EB460247 for ; Thu, 17 May 2018 16:47:18 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id B3889285FE for ; Thu, 17 May 2018 16:47:18 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id A7A692862C; Thu, 17 May 2018 16:47:18 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, MAILING_LIST_MULTI,RCVD_IN_DNSWL_NONE,T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 24E3A285FE for ; Thu, 17 May 2018 16:47:16 +0000 (UTC) Received: from alsa0.perex.cz (localhost [127.0.0.1]) by alsa0.perex.cz (Postfix) with ESMTP id 9BF8326766E; Thu, 17 May 2018 18:39:08 +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 1BE15267685; Thu, 17 May 2018 18:39:07 +0200 (CEST) Received: from heliosphere.sirena.org.uk (heliosphere.sirena.org.uk [172.104.155.198]) by alsa0.perex.cz (Postfix) with ESMTP id 8B85726765C for ; Thu, 17 May 2018 18:39:01 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sirena.org.uk; s=20170815-heliosphere; h=Date:Message-Id:In-Reply-To: Subject:Cc:To:From:Sender:Reply-To:MIME-Version:Content-Type: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:References: List-Id:List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner: List-Archive; bh=Ew5IwA4iAuOndG6zziRVQuYmPrXZvpoLq6P3S0S/9xc=; b=R8AmPX1eC0Bz ENtOQiiPKLDEHh4lcrZq96ddYf+AjlPY6lsZQql80kZeQwR6KzQBvCAfc+xEg8vmLe5BBhq2S6JzH WxVmQZsr+C7mbPie+p95XJAD3/l2vQmDRMz1sPJQ/hdMVRrx+tcJM7YDiCnAaWb39PUEsJj+DCTQU wBZlc=; Received: from [37.205.61.206] (helo=finisterre.ee.mobilebroadband) by heliosphere.sirena.org.uk with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1fJLvg-00010g-Is; Thu, 17 May 2018 16:39:00 +0000 Received: by finisterre.ee.mobilebroadband (Postfix, from userid 1000) id B2A3644007E; Thu, 17 May 2018 17:38:57 +0100 (BST) From: Mark Brown To: Hans de Goede In-Reply-To: <20180508153604.23711-18-hdegoede@redhat.com> Message-Id: <20180517163857.B2A3644007E@finisterre.ee.mobilebroadband> Date: Thu, 17 May 2018 17:38:57 +0100 (BST) Cc: Oder Chiou , alsa-devel@alsa-project.org, Takashi Iwai , Pierre-Louis Bossart , Liam Girdwood , Mark Brown , Bard Liao Subject: [alsa-devel] Applied "ASoC: Intel: bytcr_rt5640: Use dmi_first_match() for DMI quirk handling" to the asoc tree 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 The patch ASoC: Intel: bytcr_rt5640: Use dmi_first_match() for DMI quirk handling has been applied to the asoc tree at https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git All being well this means that it will be integrated into the linux-next tree (usually sometime in the next 24 hours) and sent to Linus during the next merge window (or sooner if it is a bug fix), however if problems are discovered then the patch may be dropped or reverted. You may get further e-mails resulting from automated or manual testing and review of the tree, please engage with people reporting problems and send followup patches addressing any issues that are reported if needed. If any updates are required or you are submitting further changes they should be sent as incremental updates against current git, existing patches will not be replaced. Please add any relevant lists and maintainers to the CCs when replying to this mail. Thanks, Mark From 6d1bfcc5e7d196416c2ac2d5aead05c0d7acffb0 Mon Sep 17 00:00:00 2001 From: Hans de Goede Date: Sun, 13 May 2018 09:24:33 +0200 Subject: [PATCH] ASoC: Intel: bytcr_rt5640: Use dmi_first_match() for DMI quirk handling Use dmi_first_match() instead of dmi_check_system() + callbacks, this avoid the need to initialize dmi_system_id.callback for each byt_rt5640_quirk_table entry. Signed-off-by: Hans de Goede Acked-by: Pierre-Louis Bossart Signed-off-by: Mark Brown --- sound/soc/intel/boards/bytcr_rt5640.c | 19 ++++--------------- 1 file changed, 4 insertions(+), 15 deletions(-) diff --git a/sound/soc/intel/boards/bytcr_rt5640.c b/sound/soc/intel/boards/bytcr_rt5640.c index 965721663749..0f80deaf7fce 100644 --- a/sound/soc/intel/boards/bytcr_rt5640.c +++ b/sound/soc/intel/boards/bytcr_rt5640.c @@ -395,16 +395,9 @@ static int byt_rt5640_aif1_hw_params(struct snd_pcm_substream *substream, return byt_rt5640_prepare_and_enable_pll1(dai, params_rate(params)); } -static int byt_rt5640_quirk_cb(const struct dmi_system_id *id) -{ - byt_rt5640_quirk = (unsigned long)id->driver_data; - return 1; -} - /* Please keep this list alphabetically sorted */ static const struct dmi_system_id byt_rt5640_quirk_table[] = { { - .callback = byt_rt5640_quirk_cb, .matches = { DMI_MATCH(DMI_SYS_VENDOR, "Acer"), DMI_MATCH(DMI_PRODUCT_NAME, "Aspire SW5-012"), @@ -415,7 +408,6 @@ static const struct dmi_system_id byt_rt5640_quirk_table[] = { }, { - .callback = byt_rt5640_quirk_cb, .matches = { DMI_EXACT_MATCH(DMI_SYS_VENDOR, "ASUSTeK COMPUTER INC."), DMI_EXACT_MATCH(DMI_PRODUCT_NAME, "T100TA"), @@ -427,7 +419,6 @@ static const struct dmi_system_id byt_rt5640_quirk_table[] = { BYT_RT5640_MCLK_EN), }, { - .callback = byt_rt5640_quirk_cb, .matches = { DMI_EXACT_MATCH(DMI_SYS_VENDOR, "ASUSTeK COMPUTER INC."), DMI_EXACT_MATCH(DMI_PRODUCT_NAME, "T100TAF"), @@ -439,7 +430,6 @@ static const struct dmi_system_id byt_rt5640_quirk_table[] = { BYT_RT5640_MCLK_EN), }, { - .callback = byt_rt5640_quirk_cb, .matches = { DMI_MATCH(DMI_SYS_VENDOR, "Circuitco"), DMI_MATCH(DMI_PRODUCT_NAME, "Minnowboard Max B3 PLATFORM"), @@ -447,7 +437,6 @@ static const struct dmi_system_id byt_rt5640_quirk_table[] = { .driver_data = (void *)(BYT_RT5640_DMIC1_MAP), }, { - .callback = byt_rt5640_quirk_cb, .matches = { DMI_EXACT_MATCH(DMI_SYS_VENDOR, "Dell Inc."), DMI_EXACT_MATCH(DMI_PRODUCT_NAME, "Venue 8 Pro 5830"), @@ -460,7 +449,6 @@ static const struct dmi_system_id byt_rt5640_quirk_table[] = { BYT_RT5640_MCLK_EN), }, { - .callback = byt_rt5640_quirk_cb, .matches = { DMI_EXACT_MATCH(DMI_SYS_VENDOR, "Hewlett-Packard"), DMI_EXACT_MATCH(DMI_PRODUCT_NAME, "HP ElitePad 1000 G2"), @@ -469,7 +457,6 @@ static const struct dmi_system_id byt_rt5640_quirk_table[] = { BYT_RT5640_MCLK_EN), }, { - .callback = byt_rt5640_quirk_cb, .matches = { DMI_MATCH(DMI_BOARD_VENDOR, "TECLAST"), DMI_MATCH(DMI_BOARD_NAME, "tPAD"), @@ -479,7 +466,6 @@ static const struct dmi_system_id byt_rt5640_quirk_table[] = { BYT_RT5640_SSP0_AIF1), }, { /* Catch-all for generic Insyde tablets, must be last */ - .callback = byt_rt5640_quirk_cb, .matches = { DMI_MATCH(DMI_SYS_VENDOR, "Insyde"), }, @@ -894,6 +880,7 @@ struct acpi_chan_package { /* ACPICA seems to require 64 bit integers */ static int snd_byt_rt5640_mc_probe(struct platform_device *pdev) { + const struct dmi_system_id *dmi_id; struct byt_rt5640_private *priv; struct snd_soc_acpi_mach *mach; const char *i2c_name = NULL; @@ -996,7 +983,9 @@ static int snd_byt_rt5640_mc_probe(struct platform_device *pdev) } /* check quirks before creating card */ - dmi_check_system(byt_rt5640_quirk_table); + dmi_id = dmi_first_match(byt_rt5640_quirk_table); + if (dmi_id) + byt_rt5640_quirk = (unsigned long)dmi_id->driver_data; if (quirk_override) { dev_info(&pdev->dev, "Overriding quirk 0x%x => 0x%x\n", (unsigned int)byt_rt5640_quirk, quirk_override);