From patchwork Fri Oct 6 20:09:10 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rob Herring X-Patchwork-Id: 149391 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:a888:0:b0:403:3b70:6f57 with SMTP id x8csp570312vqo; Fri, 6 Oct 2023 13:10:31 -0700 (PDT) X-Google-Smtp-Source: AGHT+IEah5u+4xvK/RWGpPTmoi6FdYy5gWUB3zspHIxgn4wXJGKTTXOGsa1VIDUORM36vLhCetMu X-Received: by 2002:a17:90b:1d04:b0:269:5b17:24b6 with SMTP id on4-20020a17090b1d0400b002695b1724b6mr8854786pjb.9.1696623031495; Fri, 06 Oct 2023 13:10:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1696623031; cv=none; d=google.com; s=arc-20160816; b=CW0kg/kq5Ae+nrvSEvryC6Pm2x5qTBjHBiTcHBllY6Yk2+zGIBJ8gfW3pP2Ag4y68v XZX3Ai/Cle5aDlwT8csYS91wdS9LlQNs6Eom/VBtW3hviTKts7kBtAm0X/wAZHqEVCQw cVt79JvtMKIX2AM9vusgL5ZlIOOkq4G7+HSxQAJQHZqd5g0ZIcWs54WKPRZa9SShOrz8 mWHE2PiRzLxa2gZuR+SoNQENDWSOMhVrZW4H2roIF4lBNEdV+HYiPJP8/UItGTvVmJP7 hSJEBSBFZdBO4uCx5ed/Hs6ILU/QXyLhpFljRWSRQvqWUmTXZ3/gJKVvRkY3Nx5ZwAsA iiZQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:in-reply-to:references:message-id :content-transfer-encoding:mime-version:subject:date:from; bh=+HlzMiwlTPfv4t+KsgaHYz19L2E+9ec0+9Z5ZUBqtKU=; fh=K47+NFGP+XJUUhVlWnvZrwzAuVJVRHKMQtU4kHl8NwM=; b=QKnKSto3qPHGY6m0EwVe//7Hhz8FnLNmUes8RDdsQ/Ie5HZDRp4xahNU9DkWKFa4co 0HoBbEL/Iq+A104CUxgbimJI+4Du4mk/herMZ+rdPbpjmOEHVCup14QRSChSHCGAHzFS +5Z3kQvZ5GL3KccOSL/QNGp8EtHgyMzd2JgO+zRydx/SFhWYZ0gXB1mOAULRzs5sCCbA P6FTY15ojppMQywGZdgapyA1Hy4nidFdkj7YRGPubZiWfneAZEaakLYhw53yq8rjHKJo lUYgMVQVlBlX8VBcdlt0xJz3qg5cyVfo6QjpcH4g68mshF2ROnRSBOmHOxHMUl8GQnYh SOqg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:2 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from agentk.vger.email (agentk.vger.email. [2620:137:e000::3:2]) by mx.google.com with ESMTPS id lp15-20020a17090b4a8f00b0027756e1f0c2si1071130pjb.7.2023.10.06.13.10.31 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 06 Oct 2023 13:10:31 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:2 as permitted sender) client-ip=2620:137:e000::3:2; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:2 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by agentk.vger.email (Postfix) with ESMTP id 81EFA819AD8E; Fri, 6 Oct 2023 13:10:25 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at agentk.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233433AbjJFUJv (ORCPT + 18 others); Fri, 6 Oct 2023 16:09:51 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:32790 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233398AbjJFUJn (ORCPT ); Fri, 6 Oct 2023 16:09:43 -0400 Received: from mail-oi1-f172.google.com (mail-oi1-f172.google.com [209.85.167.172]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4848BC5 for ; Fri, 6 Oct 2023 13:09:37 -0700 (PDT) Received: by mail-oi1-f172.google.com with SMTP id 5614622812f47-3af5fda8f6fso1649332b6e.3 for ; Fri, 06 Oct 2023 13:09:37 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1696622976; x=1697227776; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=+HlzMiwlTPfv4t+KsgaHYz19L2E+9ec0+9Z5ZUBqtKU=; b=pGwBRUTr+r6qAEORgMOlyyUNPSwe5AUzCj6Eweqc0ZNjoj6qCwEg7aYufFu1S4ku29 ijotJzg6/SiCZOtYMzppNOYSrZCcHSG9JZ9uTerjQWIUBYKCEDJfqpEaPB7Zw+0sG24n xMAe3Xta3pj5Ohu1iZbhuHOXgaokYVfjCZJcuTg3erdcIYZcCKfUKFVOIzdFIKfCwG6b pYu5qO4+VOSL7PyHUAAFARRUC3WjxeKtXx+5PHM3WXcVfdqCFGRaeUrETKeet2hHUF1y hT0rTltwf5eMjHQaAFiwMizh18HTwfCVnmBvMdVGBHW/P2G/iv2z/QhZpSn1+atQmBXK aQCQ== X-Gm-Message-State: AOJu0YyNWuNlH4uJ9ViDAk1icnKXfCOPMMnccAPJoW7cptQe9gH5UYCx VJi9J2bFVu0SXLKNwNM5mw== X-Received: by 2002:a05:6808:2221:b0:3a1:d075:348b with SMTP id bd33-20020a056808222100b003a1d075348bmr10729151oib.59.1696622976154; Fri, 06 Oct 2023 13:09:36 -0700 (PDT) Received: from robh_at_kernel.org (66-90-144-107.dyn.grandenetworks.net. [66.90.144.107]) by smtp.gmail.com with ESMTPSA id bd37-20020a056808222500b003ae11a7ab80sm707312oib.47.2023.10.06.13.09.33 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 06 Oct 2023 13:09:35 -0700 (PDT) Received: (nullmailer pid 229125 invoked by uid 1000); Fri, 06 Oct 2023 20:09:30 -0000 From: Rob Herring Date: Fri, 06 Oct 2023 15:09:10 -0500 Subject: [PATCH v3 1/5] ASoC: Explicitly include correct DT includes MIME-Version: 1.0 Message-Id: <20231006-dt-asoc-header-cleanups-v3-1-13a4f0f7fee6@kernel.org> References: <20231006-dt-asoc-header-cleanups-v3-0-13a4f0f7fee6@kernel.org> In-Reply-To: <20231006-dt-asoc-header-cleanups-v3-0-13a4f0f7fee6@kernel.org> To: Mark Brown , Claudiu Beznea , Jaroslav Kysela , Takashi Iwai , Peter Rosin , Lars-Peter Clausen , nuno.sa@analog.com, James Schulman , David Rhodes , Richard Fitzgerald , AngeloGioacchino Del Regno , Shenghao Ding , Kevin Lu , Baojun Xu , Oder Chiou , Fabio Estevam , Kiseok Jo , Kevin Cernekee , Shengjiu Wang , Xiubo Li , Nicolin Chen , Srinivas Kandagatla , Banajit Goswami , Nicolas Frattaroli , Sylwester Nawrocki , Ban Tao , Peter Ujfalusi , Jarkko Nikula , Cezary Rojewski , Pierre-Louis Bossart , Peter Ujfalusi , Bard Liao , Ranjani Sridharan , Kai Vehmanen , Olivier Moysan , Arnaud Pouliquen , Maxime Coquelin , Alexandre Torgue Cc: alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, Jernej Skrabec , Charles Keepax X-Mailer: b4 0.13-dev X-Spam-Status: No, score=2.6 required=5.0 tests=MAILING_LIST_MULTI, RCVD_IN_SBL_CSS,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on agentk.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (agentk.vger.email [0.0.0.0]); Fri, 06 Oct 2023 13:10:25 -0700 (PDT) X-Spam-Level: ** X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1779038191716660644 X-GMAIL-MSGID: 1779038191716660644 The DT of_device.h and of_platform.h date back to the separate of_platform_bus_type before it was merged into the regular platform bus. As part of that merge prepping Arm DT support 13 years ago, they "temporarily" include each other. They also include platform_device.h and of.h. As a result, there's a pretty much random mix of those include files used throughout the tree. In order to detangle these headers and replace the implicit includes with struct declarations, users need to explicitly include the correct includes. Acked-by: Jernej Skrabec Reviewed-by: AngeloGioacchino Del Regno Acked-by: Charles Keepax Reviewed-by: Claudiu Beznea # for at91 Signed-off-by: Rob Herring --- v3: - Move some header changes to patch 5 --- sound/soc/atmel/atmel_wm8904.c | 1 - sound/soc/atmel/mchp-i2s-mcc.c | 2 +- sound/soc/atmel/tse850-pcm5142.c | 1 - sound/soc/bcm/cygnus-ssp.c | 2 +- sound/soc/codecs/adau1701.c | 1 - sound/soc/codecs/adau1977-spi.c | 1 - sound/soc/codecs/ak4104.c | 2 +- sound/soc/codecs/ak4118.c | 2 +- sound/soc/codecs/ak4375.c | 2 +- sound/soc/codecs/ak4458.c | 2 +- sound/soc/codecs/ak4613.c | 2 +- sound/soc/codecs/ak4642.c | 2 +- sound/soc/codecs/ak5558.c | 2 +- sound/soc/codecs/cs35l32.c | 2 +- sound/soc/codecs/cs35l33.c | 2 -- sound/soc/codecs/cs35l34.c | 2 +- sound/soc/codecs/cs35l35.c | 3 +-- sound/soc/codecs/cs35l36.c | 3 +-- sound/soc/codecs/cs35l41-i2c.c | 2 +- sound/soc/codecs/cs35l41.c | 1 - sound/soc/codecs/cs4270.c | 2 +- sound/soc/codecs/cs42l42.c | 1 - sound/soc/codecs/cs42l56.c | 2 +- sound/soc/codecs/cs42xx8-i2c.c | 2 +- sound/soc/codecs/cs43130.c | 3 +-- sound/soc/codecs/cs4349.c | 2 +- sound/soc/codecs/da7213.c | 2 +- sound/soc/codecs/da7219.c | 2 +- sound/soc/codecs/da9055.c | 1 - sound/soc/codecs/es8328.c | 1 - sound/soc/codecs/gtm601.c | 2 +- sound/soc/codecs/lpass-macro-common.c | 2 +- sound/soc/codecs/mt6351.c | 2 +- sound/soc/codecs/mt6358.c | 2 +- sound/soc/codecs/mt6359-accdet.c | 4 ---- sound/soc/codecs/mt6359.c | 2 +- sound/soc/codecs/nau8540.c | 2 +- sound/soc/codecs/pcm1681.c | 2 -- sound/soc/codecs/rt715.c | 2 -- sound/soc/codecs/sgtl5000.c | 2 +- sound/soc/codecs/sma1303.c | 2 +- sound/soc/codecs/sta32x.c | 3 +-- sound/soc/codecs/sta350.c | 3 +-- sound/soc/codecs/tas571x.c | 2 +- sound/soc/codecs/uda1334.c | 2 +- sound/soc/codecs/wm8510.c | 2 +- sound/soc/codecs/wm8523.c | 2 +- sound/soc/codecs/wm8524.c | 2 +- sound/soc/codecs/wm8580.c | 2 +- sound/soc/codecs/wm8711.c | 2 +- sound/soc/codecs/wm8728.c | 2 +- sound/soc/codecs/wm8731-i2c.c | 2 +- sound/soc/codecs/wm8731-spi.c | 2 +- sound/soc/codecs/wm8737.c | 2 +- sound/soc/codecs/wm8741.c | 2 +- sound/soc/codecs/wm8750.c | 2 +- sound/soc/codecs/wm8753.c | 2 +- sound/soc/codecs/wm8770.c | 2 +- sound/soc/codecs/wm8776.c | 2 +- sound/soc/codecs/wm8804.c | 1 - sound/soc/fsl/efika-audio-fabric.c | 4 ++-- sound/soc/fsl/fsl_aud2htx.c | 3 +-- sound/soc/fsl/fsl_mqs.c | 2 +- sound/soc/fsl/fsl_rpmsg.c | 3 +-- sound/soc/fsl/fsl_sai.c | 3 +-- sound/soc/fsl/fsl_spdif.c | 4 +--- sound/soc/fsl/imx-audmux.c | 1 - sound/soc/fsl/imx-card.c | 3 +-- sound/soc/fsl/imx-rpmsg.c | 3 ++- sound/soc/fsl/mpc5200_dma.c | 4 ++-- sound/soc/fsl/mpc5200_psc_ac97.c | 3 +-- sound/soc/fsl/mpc5200_psc_i2s.c | 3 +-- sound/soc/fsl/mpc8610_hpcd.c | 2 +- sound/soc/fsl/p1022_ds.c | 2 +- sound/soc/fsl/p1022_rdk.c | 2 +- sound/soc/fsl/pcm030-audio-fabric.c | 3 +-- sound/soc/generic/audio-graph-card.c | 2 -- sound/soc/generic/audio-graph-card2.c | 2 -- sound/soc/generic/simple-card.c | 2 +- sound/soc/generic/test-component.c | 2 +- sound/soc/mediatek/mt2701/mt2701-afe-pcm.c | 2 -- sound/soc/mediatek/mt8183/mt8183-da7219-max98357.c | 2 +- sound/soc/mediatek/mt8183/mt8183-mt6358-ts3a227-max98357.c | 2 +- sound/soc/mediatek/mt8186/mt8186-mt6366-da7219-max98357.c | 2 +- sound/soc/mediatek/mt8186/mt8186-mt6366-rt1019-rt5682s.c | 2 +- sound/soc/mediatek/mt8188/mt8188-mt6359.c | 2 +- sound/soc/mediatek/mt8192/mt8192-mt6359-rt1015-rt5682.c | 2 +- sound/soc/mediatek/mt8195/mt8195-mt6359.c | 2 +- sound/soc/mxs/mxs-saif.c | 1 - sound/soc/mxs/mxs-sgtl5000.c | 1 - sound/soc/qcom/apq8096.c | 2 +- sound/soc/qcom/qdsp6/q6apm-dai.c | 2 +- sound/soc/qcom/qdsp6/q6asm-dai.c | 2 +- sound/soc/qcom/qdsp6/q6dsp-lpass-clocks.c | 1 - sound/soc/qcom/qdsp6/q6routing.c | 3 +-- sound/soc/qcom/sc7180.c | 2 +- sound/soc/qcom/sc7280.c | 2 +- sound/soc/qcom/sc8280xp.c | 2 +- sound/soc/qcom/sdm845.c | 2 +- sound/soc/qcom/sm8250.c | 2 +- sound/soc/rockchip/rockchip_max98090.c | 3 +-- sound/soc/samsung/aries_wm8994.c | 1 - sound/soc/samsung/arndale.c | 2 +- sound/soc/samsung/i2s.c | 2 -- sound/soc/samsung/midas_wm1811.c | 2 -- sound/soc/samsung/odroid.c | 1 - sound/soc/samsung/snow.c | 1 - sound/soc/sh/fsi.c | 1 - sound/soc/sh/rcar/core.c | 1 + sound/soc/sh/rcar/rsnd.h | 4 +--- sound/soc/sh/rcar/src.c | 1 + sound/soc/sh/rcar/ssi.c | 2 ++ sound/soc/sh/rz-ssi.c | 1 - sound/soc/sunxi/sun4i-codec.c | 4 ---- sound/soc/sunxi/sun4i-i2s.c | 2 +- sound/soc/sunxi/sun4i-spdif.c | 3 +-- sound/soc/sunxi/sun50i-codec-analog.c | 3 +-- sound/soc/sunxi/sun50i-dmic.c | 2 +- sound/soc/sunxi/sun8i-codec-analog.c | 1 - sound/soc/sunxi/sun8i-codec.c | 2 +- sound/soc/tegra/tegra186_asrc.c | 3 +-- sound/soc/tegra/tegra186_dspk.c | 2 +- sound/soc/tegra/tegra20_spdif.c | 2 +- sound/soc/tegra/tegra210_adx.c | 3 +-- sound/soc/tegra/tegra210_dmic.c | 2 +- sound/soc/tegra/tegra210_i2s.c | 2 +- sound/soc/tegra/tegra210_mixer.c | 3 +-- sound/soc/tegra/tegra210_mvc.c | 3 +-- sound/soc/tegra/tegra210_ope.c | 3 +-- sound/soc/tegra/tegra210_peq.c | 1 - sound/soc/tegra/tegra210_sfc.c | 1 - sound/soc/tegra/tegra30_i2s.c | 1 - sound/soc/tegra/tegra_asoc_machine.c | 1 - sound/soc/tegra/tegra_audio_graph_card.c | 2 +- sound/soc/ti/omap-dmic.c | 2 +- sound/soc/ti/omap-mcpdm.c | 2 +- 136 files changed, 107 insertions(+), 174 deletions(-) diff --git a/sound/soc/atmel/atmel_wm8904.c b/sound/soc/atmel/atmel_wm8904.c index 01e944fa1148..b7f16ea0cdfc 100644 --- a/sound/soc/atmel/atmel_wm8904.c +++ b/sound/soc/atmel/atmel_wm8904.c @@ -10,7 +10,6 @@ #include #include #include -#include #include diff --git a/sound/soc/atmel/mchp-i2s-mcc.c b/sound/soc/atmel/mchp-i2s-mcc.c index 25ed0b953bfd..193dd7acceb0 100644 --- a/sound/soc/atmel/mchp-i2s-mcc.c +++ b/sound/soc/atmel/mchp-i2s-mcc.c @@ -16,7 +16,7 @@ #include #include #include -#include +#include #include #include diff --git a/sound/soc/atmel/tse850-pcm5142.c b/sound/soc/atmel/tse850-pcm5142.c index c809b121037f..611da23325d3 100644 --- a/sound/soc/atmel/tse850-pcm5142.c +++ b/sound/soc/atmel/tse850-pcm5142.c @@ -38,7 +38,6 @@ #include #include #include -#include #include #include diff --git a/sound/soc/bcm/cygnus-ssp.c b/sound/soc/bcm/cygnus-ssp.c index 8638bf22ef5c..90088516fed0 100644 --- a/sound/soc/bcm/cygnus-ssp.c +++ b/sound/soc/bcm/cygnus-ssp.c @@ -5,7 +5,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/sound/soc/codecs/adau1701.c b/sound/soc/codecs/adau1701.c index 94831aad7ac6..d1392d9abccd 100644 --- a/sound/soc/codecs/adau1701.c +++ b/sound/soc/codecs/adau1701.c @@ -13,7 +13,6 @@ #include #include #include -#include #include #include #include diff --git a/sound/soc/codecs/adau1977-spi.c b/sound/soc/codecs/adau1977-spi.c index 207c5c95f35a..e7e95e5d1911 100644 --- a/sound/soc/codecs/adau1977-spi.c +++ b/sound/soc/codecs/adau1977-spi.c @@ -10,7 +10,6 @@ #include #include #include -#include #include #include diff --git a/sound/soc/codecs/ak4104.c b/sound/soc/codecs/ak4104.c index ce99f30b4613..a33cb329865c 100644 --- a/sound/soc/codecs/ak4104.c +++ b/sound/soc/codecs/ak4104.c @@ -5,10 +5,10 @@ * Copyright (c) 2009 Daniel Mack */ +#include #include #include #include -#include #include #include #include diff --git a/sound/soc/codecs/ak4118.c b/sound/soc/codecs/ak4118.c index e34e5533765c..74a10108c1d4 100644 --- a/sound/soc/codecs/ak4118.c +++ b/sound/soc/codecs/ak4118.c @@ -8,7 +8,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/sound/soc/codecs/ak4375.c b/sound/soc/codecs/ak4375.c index f287acb98646..3ee5a5c3c5fe 100644 --- a/sound/soc/codecs/ak4375.c +++ b/sound/soc/codecs/ak4375.c @@ -9,7 +9,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/sound/soc/codecs/ak4458.c b/sound/soc/codecs/ak4458.c index 77678f85ad94..73cf482f104f 100644 --- a/sound/soc/codecs/ak4458.c +++ b/sound/soc/codecs/ak4458.c @@ -9,7 +9,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/sound/soc/codecs/ak4613.c b/sound/soc/codecs/ak4613.c index 619a817ee91c..73fb35560e51 100644 --- a/sound/soc/codecs/ak4613.c +++ b/sound/soc/codecs/ak4613.c @@ -99,7 +99,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/sound/soc/codecs/ak4642.c b/sound/soc/codecs/ak4642.c index 8a40c6b3f4d8..fe035d2fc913 100644 --- a/sound/soc/codecs/ak4642.c +++ b/sound/soc/codecs/ak4642.c @@ -24,7 +24,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/sound/soc/codecs/ak5558.c b/sound/soc/codecs/ak5558.c index 442e2cb42df4..6c767609f95d 100644 --- a/sound/soc/codecs/ak5558.c +++ b/sound/soc/codecs/ak5558.c @@ -9,7 +9,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/sound/soc/codecs/cs35l32.c b/sound/soc/codecs/cs35l32.c index 6e658bb16fb0..138040618438 100644 --- a/sound/soc/codecs/cs35l32.c +++ b/sound/soc/codecs/cs35l32.c @@ -19,7 +19,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/sound/soc/codecs/cs35l33.c b/sound/soc/codecs/cs35l33.c index 9968c2e189e6..4010a2d33a33 100644 --- a/sound/soc/codecs/cs35l33.c +++ b/sound/soc/codecs/cs35l33.c @@ -30,8 +30,6 @@ #include #include #include -#include -#include #include "cs35l33.h" #include "cirrus_legacy.h" diff --git a/sound/soc/codecs/cs35l34.c b/sound/soc/codecs/cs35l34.c index 6974dd461410..e5871736fa29 100644 --- a/sound/soc/codecs/cs35l34.c +++ b/sound/soc/codecs/cs35l34.c @@ -19,7 +19,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/sound/soc/codecs/cs35l35.c b/sound/soc/codecs/cs35l35.c index 0a4b5aa78185..63a538f747d3 100644 --- a/sound/soc/codecs/cs35l35.c +++ b/sound/soc/codecs/cs35l35.c @@ -17,7 +17,7 @@ #include #include #include -#include +#include #include #include #include @@ -29,7 +29,6 @@ #include #include #include -#include #include #include "cs35l35.h" diff --git a/sound/soc/codecs/cs35l36.c b/sound/soc/codecs/cs35l36.c index 20084c7d3acb..f2fde6e652b9 100644 --- a/sound/soc/codecs/cs35l36.c +++ b/sound/soc/codecs/cs35l36.c @@ -17,7 +17,7 @@ #include #include #include -#include +#include #include #include #include @@ -29,7 +29,6 @@ #include #include #include -#include #include #include "cs35l36.h" diff --git a/sound/soc/codecs/cs35l41-i2c.c b/sound/soc/codecs/cs35l41-i2c.c index 96414ee35285..a0c457c0d04b 100644 --- a/sound/soc/codecs/cs35l41-i2c.c +++ b/sound/soc/codecs/cs35l41-i2c.c @@ -13,7 +13,7 @@ #include #include #include -#include +#include #include #include diff --git a/sound/soc/codecs/cs35l41.c b/sound/soc/codecs/cs35l41.c index 4bc64ba71cd6..d0e9128ac6d0 100644 --- a/sound/soc/codecs/cs35l41.c +++ b/sound/soc/codecs/cs35l41.c @@ -13,7 +13,6 @@ #include #include #include -#include #include #include #include diff --git a/sound/soc/codecs/cs4270.c b/sound/soc/codecs/cs4270.c index 3df567214952..3bbb90c827f2 100644 --- a/sound/soc/codecs/cs4270.c +++ b/sound/soc/codecs/cs4270.c @@ -21,6 +21,7 @@ * - Power management is supported */ +#include #include #include #include @@ -30,7 +31,6 @@ #include #include #include -#include #define CS4270_FORMATS (SNDRV_PCM_FMTBIT_S8 | SNDRV_PCM_FMTBIT_S16_LE | \ SNDRV_PCM_FMTBIT_S18_3LE | SNDRV_PCM_FMTBIT_S20_3LE | \ diff --git a/sound/soc/codecs/cs42l42.c b/sound/soc/codecs/cs42l42.c index 2961340f15e2..94bcab812629 100644 --- a/sound/soc/codecs/cs42l42.c +++ b/sound/soc/codecs/cs42l42.c @@ -24,7 +24,6 @@ #include #include #include -#include #include #include #include diff --git a/sound/soc/codecs/cs42l56.c b/sound/soc/codecs/cs42l56.c index 1714857594fb..3e3a86dab4fc 100644 --- a/sound/soc/codecs/cs42l56.c +++ b/sound/soc/codecs/cs42l56.c @@ -20,7 +20,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/sound/soc/codecs/cs42xx8-i2c.c b/sound/soc/codecs/cs42xx8-i2c.c index 9028c0f0fe77..ecaebf8e1c8f 100644 --- a/sound/soc/codecs/cs42xx8-i2c.c +++ b/sound/soc/codecs/cs42xx8-i2c.c @@ -12,7 +12,7 @@ #include #include -#include +#include #include #include diff --git a/sound/soc/codecs/cs43130.c b/sound/soc/codecs/cs43130.c index 3292405024bc..0b40fdfb1825 100644 --- a/sound/soc/codecs/cs43130.c +++ b/sound/soc/codecs/cs43130.c @@ -16,7 +16,7 @@ #include #include #include -#include +#include #include #include #include @@ -29,7 +29,6 @@ #include #include #include -#include #include #include #include diff --git a/sound/soc/codecs/cs4349.c b/sound/soc/codecs/cs4349.c index ef08e51901b5..9083228495d4 100644 --- a/sound/soc/codecs/cs4349.c +++ b/sound/soc/codecs/cs4349.c @@ -7,6 +7,7 @@ * Authors: Tim Howe */ +#include #include #include #include @@ -17,7 +18,6 @@ #include #include #include -#include #include #include #include diff --git a/sound/soc/codecs/da7213.c b/sound/soc/codecs/da7213.c index 49d97627abc6..37db1b5e20a6 100644 --- a/sound/soc/codecs/da7213.c +++ b/sound/soc/codecs/da7213.c @@ -9,7 +9,7 @@ */ #include -#include +#include #include #include #include diff --git a/sound/soc/codecs/da7219.c b/sound/soc/codecs/da7219.c index 600c2db58756..311ea7918b31 100644 --- a/sound/soc/codecs/da7219.c +++ b/sound/soc/codecs/da7219.c @@ -12,7 +12,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/sound/soc/codecs/da9055.c b/sound/soc/codecs/da9055.c index ae20086777b5..c8a34572965d 100644 --- a/sound/soc/codecs/da9055.c +++ b/sound/soc/codecs/da9055.c @@ -15,7 +15,6 @@ #include #include #include -#include #include #include #include diff --git a/sound/soc/codecs/es8328.c b/sound/soc/codecs/es8328.c index 0bd9ba5a11b4..97cfa0c8e81b 100644 --- a/sound/soc/codecs/es8328.c +++ b/sound/soc/codecs/es8328.c @@ -9,7 +9,6 @@ #include #include -#include #include #include #include diff --git a/sound/soc/codecs/gtm601.c b/sound/soc/codecs/gtm601.c index c6b1e77ffccd..1f165e46701f 100644 --- a/sound/soc/codecs/gtm601.c +++ b/sound/soc/codecs/gtm601.c @@ -13,7 +13,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/sound/soc/codecs/lpass-macro-common.c b/sound/soc/codecs/lpass-macro-common.c index f54baaad54d4..da1b422250b8 100644 --- a/sound/soc/codecs/lpass-macro-common.c +++ b/sound/soc/codecs/lpass-macro-common.c @@ -4,7 +4,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/sound/soc/codecs/mt6351.c b/sound/soc/codecs/mt6351.c index d2cf4847eead..2a5e963fb2b5 100644 --- a/sound/soc/codecs/mt6351.c +++ b/sound/soc/codecs/mt6351.c @@ -8,8 +8,8 @@ #include #include #include +#include #include -#include #include #include diff --git a/sound/soc/codecs/mt6358.c b/sound/soc/codecs/mt6358.c index d7b157ddc9a8..0284e29c11d3 100644 --- a/sound/soc/codecs/mt6358.c +++ b/sound/soc/codecs/mt6358.c @@ -6,8 +6,8 @@ // Author: KaiChieh Chuang #include +#include #include -#include #include #include #include diff --git a/sound/soc/codecs/mt6359-accdet.c b/sound/soc/codecs/mt6359-accdet.c index 7f624854948c..ed34cc15b80e 100644 --- a/sound/soc/codecs/mt6359-accdet.c +++ b/sound/soc/codecs/mt6359-accdet.c @@ -6,11 +6,7 @@ // Author: Argus Lin // -#include #include -#include -#include -#include #include #include #include diff --git a/sound/soc/codecs/mt6359.c b/sound/soc/codecs/mt6359.c index 30690479ec17..0b76a55664b0 100644 --- a/sound/soc/codecs/mt6359.c +++ b/sound/soc/codecs/mt6359.c @@ -9,7 +9,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/sound/soc/codecs/nau8540.c b/sound/soc/codecs/nau8540.c index 2174a89772fc..5cf28d034f09 100644 --- a/sound/soc/codecs/nau8540.c +++ b/sound/soc/codecs/nau8540.c @@ -16,7 +16,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/sound/soc/codecs/pcm1681.c b/sound/soc/codecs/pcm1681.c index 735e1942b530..316ad53bc66a 100644 --- a/sound/soc/codecs/pcm1681.c +++ b/sound/soc/codecs/pcm1681.c @@ -13,8 +13,6 @@ #include #include #include -#include -#include #include #include #include diff --git a/sound/soc/codecs/rt715.c b/sound/soc/codecs/rt715.c index b59230c8fd32..ed0af0213d60 100644 --- a/sound/soc/codecs/rt715.c +++ b/sound/soc/codecs/rt715.c @@ -20,8 +20,6 @@ #include #include #include -#include -#include #include #include #include diff --git a/sound/soc/codecs/sgtl5000.c b/sound/soc/codecs/sgtl5000.c index b22ba95bd0c0..2f468f41b94d 100644 --- a/sound/soc/codecs/sgtl5000.c +++ b/sound/soc/codecs/sgtl5000.c @@ -13,11 +13,11 @@ #include #include #include +#include #include #include #include #include -#include #include #include #include diff --git a/sound/soc/codecs/sma1303.c b/sound/soc/codecs/sma1303.c index 7b9abbc1bd94..61072e7574a0 100644 --- a/sound/soc/codecs/sma1303.c +++ b/sound/soc/codecs/sma1303.c @@ -7,6 +7,7 @@ // Auther: Gyuhwa Park // Kiseok Jo +#include #include #include #include @@ -21,7 +22,6 @@ #include #include #include -#include #include #include diff --git a/sound/soc/codecs/sta32x.c b/sound/soc/codecs/sta32x.c index 34ffd32ab9dc..fcf0dbfbbbca 100644 --- a/sound/soc/codecs/sta32x.c +++ b/sound/soc/codecs/sta32x.c @@ -21,8 +21,7 @@ #include #include #include -#include -#include +#include #include #include #include diff --git a/sound/soc/codecs/sta350.c b/sound/soc/codecs/sta350.c index e4a9e9241c60..612cc1d7eafe 100644 --- a/sound/soc/codecs/sta350.c +++ b/sound/soc/codecs/sta350.c @@ -22,8 +22,7 @@ #include #include #include -#include -#include +#include #include #include #include diff --git a/sound/soc/codecs/tas571x.c b/sound/soc/codecs/tas571x.c index a220342c3d77..f249e93e2a4e 100644 --- a/sound/soc/codecs/tas571x.c +++ b/sound/soc/codecs/tas571x.c @@ -20,7 +20,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/sound/soc/codecs/uda1334.c b/sound/soc/codecs/uda1334.c index eace96533600..296caad5d026 100644 --- a/sound/soc/codecs/uda1334.c +++ b/sound/soc/codecs/uda1334.c @@ -4,13 +4,13 @@ // // Based on WM8523 ALSA SoC Audio driver written by Mark Brown +#include #include #include #include #include #include #include -#include #include #include #include diff --git a/sound/soc/codecs/wm8510.c b/sound/soc/codecs/wm8510.c index 6636a70f3895..0e671cce8447 100644 --- a/sound/soc/codecs/wm8510.c +++ b/sound/soc/codecs/wm8510.c @@ -7,6 +7,7 @@ * Author: Liam Girdwood */ +#include #include #include #include @@ -16,7 +17,6 @@ #include #include #include -#include #include #include #include diff --git a/sound/soc/codecs/wm8523.c b/sound/soc/codecs/wm8523.c index ea87cd3cc0d6..41b14538b03c 100644 --- a/sound/soc/codecs/wm8523.c +++ b/sound/soc/codecs/wm8523.c @@ -7,6 +7,7 @@ * Author: Mark Brown */ +#include #include #include #include @@ -16,7 +17,6 @@ #include #include #include -#include #include #include #include diff --git a/sound/soc/codecs/wm8524.c b/sound/soc/codecs/wm8524.c index b56dcac60244..fa9942a08927 100644 --- a/sound/soc/codecs/wm8524.c +++ b/sound/soc/codecs/wm8524.c @@ -8,13 +8,13 @@ * Based on WM8523 ALSA SoC Audio driver written by Mark Brown */ +#include #include #include #include #include #include #include -#include #include #include #include diff --git a/sound/soc/codecs/wm8580.c b/sound/soc/codecs/wm8580.c index 28c0ba348634..73a8edc797fb 100644 --- a/sound/soc/codecs/wm8580.c +++ b/sound/soc/codecs/wm8580.c @@ -15,6 +15,7 @@ * the secondary audio interfaces are not. */ +#include #include #include #include @@ -25,7 +26,6 @@ #include #include #include -#include #include #include diff --git a/sound/soc/codecs/wm8711.c b/sound/soc/codecs/wm8711.c index 916f297164de..7d339cc65208 100644 --- a/sound/soc/codecs/wm8711.c +++ b/sound/soc/codecs/wm8711.c @@ -9,6 +9,7 @@ * Based on wm8731.c by Richard Purdie */ +#include #include #include #include @@ -18,7 +19,6 @@ #include #include #include -#include #include #include #include diff --git a/sound/soc/codecs/wm8728.c b/sound/soc/codecs/wm8728.c index 0c943e7d4159..d9cc78fbf1ea 100644 --- a/sound/soc/codecs/wm8728.c +++ b/sound/soc/codecs/wm8728.c @@ -7,6 +7,7 @@ * Author: Mark Brown */ +#include #include #include #include @@ -17,7 +18,6 @@ #include #include #include -#include #include #include #include diff --git a/sound/soc/codecs/wm8731-i2c.c b/sound/soc/codecs/wm8731-i2c.c index c39e637d813d..7f68ad0380e0 100644 --- a/sound/soc/codecs/wm8731-i2c.c +++ b/sound/soc/codecs/wm8731-i2c.c @@ -11,8 +11,8 @@ */ #include +#include #include -#include #include "wm8731.h" diff --git a/sound/soc/codecs/wm8731-spi.c b/sound/soc/codecs/wm8731-spi.c index 542ed097d89a..c02086afa7fb 100644 --- a/sound/soc/codecs/wm8731-spi.c +++ b/sound/soc/codecs/wm8731-spi.c @@ -11,8 +11,8 @@ */ #include +#include #include -#include #include "wm8731.h" diff --git a/sound/soc/codecs/wm8737.c b/sound/soc/codecs/wm8737.c index 0d231c289ef3..a0ba1e7dee98 100644 --- a/sound/soc/codecs/wm8737.c +++ b/sound/soc/codecs/wm8737.c @@ -7,6 +7,7 @@ * Author: Mark Brown */ +#include #include #include #include @@ -17,7 +18,6 @@ #include #include #include -#include #include #include #include diff --git a/sound/soc/codecs/wm8741.c b/sound/soc/codecs/wm8741.c index 19e8fc4062c7..a0848774427b 100644 --- a/sound/soc/codecs/wm8741.c +++ b/sound/soc/codecs/wm8741.c @@ -14,10 +14,10 @@ #include #include #include +#include #include #include #include -#include #include #include #include diff --git a/sound/soc/codecs/wm8750.c b/sound/soc/codecs/wm8750.c index 2d2feaf95e49..b8d76cd001da 100644 --- a/sound/soc/codecs/wm8750.c +++ b/sound/soc/codecs/wm8750.c @@ -15,10 +15,10 @@ #include #include #include +#include #include #include #include -#include #include #include #include diff --git a/sound/soc/codecs/wm8753.c b/sound/soc/codecs/wm8753.c index b5d8290c37d9..f42ed24314f3 100644 --- a/sound/soc/codecs/wm8753.c +++ b/sound/soc/codecs/wm8753.c @@ -26,13 +26,13 @@ * an alsa kcontrol. This allows the PCM to remain open. */ +#include #include #include #include #include #include #include -#include #include #include #include diff --git a/sound/soc/codecs/wm8770.c b/sound/soc/codecs/wm8770.c index 2469f4f3bea3..38376b605201 100644 --- a/sound/soc/codecs/wm8770.c +++ b/sound/soc/codecs/wm8770.c @@ -7,11 +7,11 @@ * Author: Dimitris Papastamos */ +#include #include #include #include #include -#include #include #include #include diff --git a/sound/soc/codecs/wm8776.c b/sound/soc/codecs/wm8776.c index 0673bbd32bab..166e00fcd11d 100644 --- a/sound/soc/codecs/wm8776.c +++ b/sound/soc/codecs/wm8776.c @@ -9,13 +9,13 @@ * TODO: Input ALC/limiter support */ +#include #include #include #include #include #include #include -#include #include #include #include diff --git a/sound/soc/codecs/wm8804.c b/sound/soc/codecs/wm8804.c index bbb4b6e3b41c..cfa78e4d8b73 100644 --- a/sound/soc/codecs/wm8804.c +++ b/sound/soc/codecs/wm8804.c @@ -14,7 +14,6 @@ #include #include #include -#include #include #include #include diff --git a/sound/soc/fsl/efika-audio-fabric.c b/sound/soc/fsl/efika-audio-fabric.c index 8f6396faec9b..de17b103a4cf 100644 --- a/sound/soc/fsl/efika-audio-fabric.c +++ b/sound/soc/fsl/efika-audio-fabric.c @@ -15,8 +15,8 @@ #include #include #include -#include -#include +#include +#include #include #include diff --git a/sound/soc/fsl/fsl_aud2htx.c b/sound/soc/fsl/fsl_aud2htx.c index fc56f6ade368..ee2f6ad1f800 100644 --- a/sound/soc/fsl/fsl_aud2htx.c +++ b/sound/soc/fsl/fsl_aud2htx.c @@ -5,9 +5,8 @@ #include #include #include +#include #include -#include -#include #include #include #include diff --git a/sound/soc/fsl/fsl_mqs.c b/sound/soc/fsl/fsl_mqs.c index 49ae7f6267d3..f2d74ec05cdf 100644 --- a/sound/soc/fsl/fsl_mqs.c +++ b/sound/soc/fsl/fsl_mqs.c @@ -10,7 +10,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/sound/soc/fsl/fsl_rpmsg.c b/sound/soc/fsl/fsl_rpmsg.c index abe19a8a7aa7..5c5c04ce9db7 100644 --- a/sound/soc/fsl/fsl_rpmsg.c +++ b/sound/soc/fsl/fsl_rpmsg.c @@ -6,8 +6,7 @@ #include #include #include -#include -#include +#include #include #include #include diff --git a/sound/soc/fsl/fsl_sai.c b/sound/soc/fsl/fsl_sai.c index 8a9a30dd31e2..79e7c6b98a75 100644 --- a/sound/soc/fsl/fsl_sai.c +++ b/sound/soc/fsl/fsl_sai.c @@ -8,8 +8,7 @@ #include #include #include -#include -#include +#include #include #include #include diff --git a/sound/soc/fsl/fsl_spdif.c b/sound/soc/fsl/fsl_spdif.c index d42cc2f55baa..a63121c888e0 100644 --- a/sound/soc/fsl/fsl_spdif.c +++ b/sound/soc/fsl/fsl_spdif.c @@ -12,9 +12,7 @@ #include #include #include -#include -#include -#include +#include #include #include diff --git a/sound/soc/fsl/imx-audmux.c b/sound/soc/fsl/imx-audmux.c index be003a117b39..747ab2f1aae3 100644 --- a/sound/soc/fsl/imx-audmux.c +++ b/sound/soc/fsl/imx-audmux.c @@ -13,7 +13,6 @@ #include #include #include -#include #include #include diff --git a/sound/soc/fsl/imx-card.c b/sound/soc/fsl/imx-card.c index f71b3c134001..cb8723965f2f 100644 --- a/sound/soc/fsl/imx-card.c +++ b/sound/soc/fsl/imx-card.c @@ -5,9 +5,8 @@ #include #include #include -#include +#include #include -#include #include #include #include diff --git a/sound/soc/fsl/imx-rpmsg.c b/sound/soc/fsl/imx-rpmsg.c index a9324712e3fa..a0c5c35817dd 100644 --- a/sound/soc/fsl/imx-rpmsg.c +++ b/sound/soc/fsl/imx-rpmsg.c @@ -2,8 +2,9 @@ // Copyright 2017-2020 NXP #include -#include +#include #include +#include #include #include #include diff --git a/sound/soc/fsl/mpc5200_dma.c b/sound/soc/fsl/mpc5200_dma.c index 866a533fec83..4b45e24274fa 100644 --- a/sound/soc/fsl/mpc5200_dma.c +++ b/sound/soc/fsl/mpc5200_dma.c @@ -7,12 +7,12 @@ // Copyright (C) 2009 Jon Smirl, Digispeaker #include -#include #include #include +#include #include #include -#include +#include #include diff --git a/sound/soc/fsl/mpc5200_psc_ac97.c b/sound/soc/fsl/mpc5200_psc_ac97.c index 1671bcd4ee3d..0423cf43c7a0 100644 --- a/sound/soc/fsl/mpc5200_psc_ac97.c +++ b/sound/soc/fsl/mpc5200_psc_ac97.c @@ -5,9 +5,8 @@ // Copyright (C) 2009 Jon Smirl, Digispeaker // Author: Jon Smirl +#include #include -#include -#include #include #include diff --git a/sound/soc/fsl/mpc5200_psc_i2s.c b/sound/soc/fsl/mpc5200_psc_i2s.c index 22bde475e935..af8b9d098d2d 100644 --- a/sound/soc/fsl/mpc5200_psc_i2s.c +++ b/sound/soc/fsl/mpc5200_psc_i2s.c @@ -7,8 +7,7 @@ // Copyright (C) 2009 Jon Smirl, Digispeaker #include -#include -#include +#include #include #include diff --git a/sound/soc/fsl/mpc8610_hpcd.c b/sound/soc/fsl/mpc8610_hpcd.c index a635e08f14ce..52fb9e7bcca4 100644 --- a/sound/soc/fsl/mpc8610_hpcd.c +++ b/sound/soc/fsl/mpc8610_hpcd.c @@ -9,8 +9,8 @@ #include #include #include +#include #include -#include #include #include diff --git a/sound/soc/fsl/p1022_ds.c b/sound/soc/fsl/p1022_ds.c index db09e8366944..6f5eecf6d88c 100644 --- a/sound/soc/fsl/p1022_ds.c +++ b/sound/soc/fsl/p1022_ds.c @@ -9,8 +9,8 @@ #include #include #include +#include #include -#include #include #include diff --git a/sound/soc/fsl/p1022_rdk.c b/sound/soc/fsl/p1022_rdk.c index 2d7350204095..18d129c21648 100644 --- a/sound/soc/fsl/p1022_rdk.c +++ b/sound/soc/fsl/p1022_rdk.c @@ -16,8 +16,8 @@ #include #include #include +#include #include -#include #include #include diff --git a/sound/soc/fsl/pcm030-audio-fabric.c b/sound/soc/fsl/pcm030-audio-fabric.c index d24c02e90878..2bab0fc1de59 100644 --- a/sound/soc/fsl/pcm030-audio-fabric.c +++ b/sound/soc/fsl/pcm030-audio-fabric.c @@ -9,8 +9,7 @@ #include #include #include -#include -#include +#include #include diff --git a/sound/soc/generic/audio-graph-card.c b/sound/soc/generic/audio-graph-card.c index e4a9420bba85..704f32bda24d 100644 --- a/sound/soc/generic/audio-graph-card.c +++ b/sound/soc/generic/audio-graph-card.c @@ -13,8 +13,6 @@ #include #include #include -#include -#include #include #include #include diff --git a/sound/soc/generic/audio-graph-card2.c b/sound/soc/generic/audio-graph-card2.c index 5d856942bcae..1344e1adfc67 100644 --- a/sound/soc/generic/audio-graph-card2.c +++ b/sound/soc/generic/audio-graph-card2.c @@ -12,8 +12,6 @@ #include #include #include -#include -#include #include #include #include diff --git a/sound/soc/generic/simple-card.c b/sound/soc/generic/simple-card.c index b95b86315502..048357ae7ae6 100644 --- a/sound/soc/generic/simple-card.c +++ b/sound/soc/generic/simple-card.c @@ -9,7 +9,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/sound/soc/generic/test-component.c b/sound/soc/generic/test-component.c index 8c3eb4424efc..e4967540a2e1 100644 --- a/sound/soc/generic/test-component.c +++ b/sound/soc/generic/test-component.c @@ -6,7 +6,7 @@ // Kuninori Morimoto #include -#include +#include #include #include #include diff --git a/sound/soc/mediatek/mt2701/mt2701-afe-pcm.c b/sound/soc/mediatek/mt2701/mt2701-afe-pcm.c index 86885117f7f7..6a17deb874df 100644 --- a/sound/soc/mediatek/mt2701/mt2701-afe-pcm.c +++ b/sound/soc/mediatek/mt2701/mt2701-afe-pcm.c @@ -12,8 +12,6 @@ #include #include #include -#include -#include #include #include "mt2701-afe-common.h" diff --git a/sound/soc/mediatek/mt8183/mt8183-da7219-max98357.c b/sound/soc/mediatek/mt8183/mt8183-da7219-max98357.c index a0b4eeece9b7..acaf81fd6c9b 100644 --- a/sound/soc/mediatek/mt8183/mt8183-da7219-max98357.c +++ b/sound/soc/mediatek/mt8183/mt8183-da7219-max98357.c @@ -8,7 +8,7 @@ #include #include -#include +#include #include #include #include diff --git a/sound/soc/mediatek/mt8183/mt8183-mt6358-ts3a227-max98357.c b/sound/soc/mediatek/mt8183/mt8183-mt6358-ts3a227-max98357.c index 1771c26b0445..bb6df056a878 100644 --- a/sound/soc/mediatek/mt8183/mt8183-mt6358-ts3a227-max98357.c +++ b/sound/soc/mediatek/mt8183/mt8183-mt6358-ts3a227-max98357.c @@ -7,7 +7,7 @@ // Author: Shunli Wang #include -#include +#include #include #include #include diff --git a/sound/soc/mediatek/mt8186/mt8186-mt6366-da7219-max98357.c b/sound/soc/mediatek/mt8186/mt8186-mt6366-da7219-max98357.c index f795190f92a2..d86dc45be30c 100644 --- a/sound/soc/mediatek/mt8186/mt8186-mt6366-da7219-max98357.c +++ b/sound/soc/mediatek/mt8186/mt8186-mt6366-da7219-max98357.c @@ -9,7 +9,7 @@ #include #include -#include +#include #include #include #include diff --git a/sound/soc/mediatek/mt8186/mt8186-mt6366-rt1019-rt5682s.c b/sound/soc/mediatek/mt8186/mt8186-mt6366-rt1019-rt5682s.c index 6be33892be0a..8e216e92c142 100644 --- a/sound/soc/mediatek/mt8186/mt8186-mt6366-rt1019-rt5682s.c +++ b/sound/soc/mediatek/mt8186/mt8186-mt6366-rt1019-rt5682s.c @@ -11,7 +11,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/sound/soc/mediatek/mt8188/mt8188-mt6359.c b/sound/soc/mediatek/mt8188/mt8188-mt6359.c index 1564eaa1b290..ed487c14f268 100644 --- a/sound/soc/mediatek/mt8188/mt8188-mt6359.c +++ b/sound/soc/mediatek/mt8188/mt8188-mt6359.c @@ -9,7 +9,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/sound/soc/mediatek/mt8192/mt8192-mt6359-rt1015-rt5682.c b/sound/soc/mediatek/mt8192/mt8192-mt6359-rt1015-rt5682.c index fe3562ea83ce..5bd6addd1450 100644 --- a/sound/soc/mediatek/mt8192/mt8192-mt6359-rt1015-rt5682.c +++ b/sound/soc/mediatek/mt8192/mt8192-mt6359-rt1015-rt5682.c @@ -9,7 +9,7 @@ #include #include -#include +#include #include #include #include diff --git a/sound/soc/mediatek/mt8195/mt8195-mt6359.c b/sound/soc/mediatek/mt8195/mt8195-mt6359.c index 9138f38861ff..4feb9fb76967 100644 --- a/sound/soc/mediatek/mt8195/mt8195-mt6359.c +++ b/sound/soc/mediatek/mt8195/mt8195-mt6359.c @@ -10,7 +10,7 @@ #include #include -#include +#include #include #include #include diff --git a/sound/soc/mxs/mxs-saif.c b/sound/soc/mxs/mxs-saif.c index ac761d3a01c0..3e3a62df3d7e 100644 --- a/sound/soc/mxs/mxs-saif.c +++ b/sound/soc/mxs/mxs-saif.c @@ -6,7 +6,6 @@ #include #include #include -#include #include #include #include diff --git a/sound/soc/mxs/mxs-sgtl5000.c b/sound/soc/mxs/mxs-sgtl5000.c index 01cb5c5e72fe..310e3ac77424 100644 --- a/sound/soc/mxs/mxs-sgtl5000.c +++ b/sound/soc/mxs/mxs-sgtl5000.c @@ -6,7 +6,6 @@ #include #include #include -#include #include #include #include diff --git a/sound/soc/qcom/apq8096.c b/sound/soc/qcom/apq8096.c index cddeb47dbcf2..7ee6df02b906 100644 --- a/sound/soc/qcom/apq8096.c +++ b/sound/soc/qcom/apq8096.c @@ -1,9 +1,9 @@ // SPDX-License-Identifier: GPL-2.0 // Copyright (c) 2018, Linaro Limited +#include #include #include -#include #include #include #include diff --git a/sound/soc/qcom/qdsp6/q6apm-dai.c b/sound/soc/qcom/qdsp6/q6apm-dai.c index 739856a00017..b799ac724627 100644 --- a/sound/soc/qcom/qdsp6/q6apm-dai.c +++ b/sound/soc/qcom/qdsp6/q6apm-dai.c @@ -4,6 +4,7 @@ #include #include #include +#include #include #include #include @@ -12,7 +13,6 @@ #include #include #include -#include #include #include "q6apm.h" diff --git a/sound/soc/qcom/qdsp6/q6asm-dai.c b/sound/soc/qcom/qdsp6/q6asm-dai.c index 5e14cd0a38de..0f4a7523a923 100644 --- a/sound/soc/qcom/qdsp6/q6asm-dai.c +++ b/sound/soc/qcom/qdsp6/q6asm-dai.c @@ -5,6 +5,7 @@ #include #include #include +#include #include #include #include @@ -14,7 +15,6 @@ #include #include #include -#include #include #include "q6asm.h" #include "q6routing.h" diff --git a/sound/soc/qcom/qdsp6/q6dsp-lpass-clocks.c b/sound/soc/qcom/qdsp6/q6dsp-lpass-clocks.c index 4613867d1133..e758411603be 100644 --- a/sound/soc/qcom/qdsp6/q6dsp-lpass-clocks.c +++ b/sound/soc/qcom/qdsp6/q6dsp-lpass-clocks.c @@ -8,7 +8,6 @@ #include #include #include -#include #include #include #include "q6dsp-lpass-clocks.h" diff --git a/sound/soc/qcom/qdsp6/q6routing.c b/sound/soc/qcom/qdsp6/q6routing.c index c583faae3a3e..5e89930d8dca 100644 --- a/sound/soc/qcom/qdsp6/q6routing.c +++ b/sound/soc/qcom/qdsp6/q6routing.c @@ -5,11 +5,10 @@ #include #include #include +#include #include -#include #include #include -#include #include #include #include diff --git a/sound/soc/qcom/sc7180.c b/sound/soc/qcom/sc7180.c index d1fd40e3f7a9..cf1da775e82b 100644 --- a/sound/soc/qcom/sc7180.c +++ b/sound/soc/qcom/sc7180.c @@ -8,7 +8,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/sound/soc/qcom/sc7280.c b/sound/soc/qcom/sc7280.c index c23df4c8f341..f636c0d2ca36 100644 --- a/sound/soc/qcom/sc7280.c +++ b/sound/soc/qcom/sc7280.c @@ -5,8 +5,8 @@ // ALSA SoC Machine driver for sc7280 #include +#include #include -#include #include #include #include diff --git a/sound/soc/qcom/sc8280xp.c b/sound/soc/qcom/sc8280xp.c index cfb9c8dbd599..870d7b69465d 100644 --- a/sound/soc/qcom/sc8280xp.c +++ b/sound/soc/qcom/sc8280xp.c @@ -1,9 +1,9 @@ // SPDX-License-Identifier: GPL-2.0 // Copyright (c) 2022, Linaro Limited +#include #include #include -#include #include #include #include diff --git a/sound/soc/qcom/sdm845.c b/sound/soc/qcom/sdm845.c index 25b964dea6c5..ad65e45644c3 100644 --- a/sound/soc/qcom/sdm845.c +++ b/sound/soc/qcom/sdm845.c @@ -3,9 +3,9 @@ * Copyright (c) 2018, The Linux Foundation. All rights reserved. */ +#include #include #include -#include #include #include #include diff --git a/sound/soc/qcom/sm8250.c b/sound/soc/qcom/sm8250.c index 6558bf2e14e8..92350e9cc30e 100644 --- a/sound/soc/qcom/sm8250.c +++ b/sound/soc/qcom/sm8250.c @@ -1,9 +1,9 @@ // SPDX-License-Identifier: GPL-2.0 // Copyright (c) 2020, Linaro Limited +#include #include #include -#include #include #include #include diff --git a/sound/soc/rockchip/rockchip_max98090.c b/sound/soc/rockchip/rockchip_max98090.c index 17087b504a37..c4d79de5d1aa 100644 --- a/sound/soc/rockchip/rockchip_max98090.c +++ b/sound/soc/rockchip/rockchip_max98090.c @@ -6,11 +6,10 @@ */ #include -#include +#include #include #include #include -#include #include #include #include diff --git a/sound/soc/samsung/aries_wm8994.c b/sound/soc/samsung/aries_wm8994.c index fa7dd04fe94e..a548ac33dd94 100644 --- a/sound/soc/samsung/aries_wm8994.c +++ b/sound/soc/samsung/aries_wm8994.c @@ -5,7 +5,6 @@ #include #include #include -#include #include #include #include diff --git a/sound/soc/samsung/arndale.c b/sound/soc/samsung/arndale.c index 80a57bff1d02..f02873b6ce7f 100644 --- a/sound/soc/samsung/arndale.c +++ b/sound/soc/samsung/arndale.c @@ -5,7 +5,7 @@ // Author: Claude #include -#include +#include #include #include diff --git a/sound/soc/samsung/i2s.c b/sound/soc/samsung/i2s.c index 0d61055ddc59..9552748aea2e 100644 --- a/sound/soc/samsung/i2s.c +++ b/sound/soc/samsung/i2s.c @@ -13,8 +13,6 @@ #include #include #include -#include -#include #include #include diff --git a/sound/soc/samsung/midas_wm1811.c b/sound/soc/samsung/midas_wm1811.c index bc4214530e95..f31244156ff6 100644 --- a/sound/soc/samsung/midas_wm1811.c +++ b/sound/soc/samsung/midas_wm1811.c @@ -10,8 +10,6 @@ #include #include #include -#include -#include #include #include #include diff --git a/sound/soc/samsung/odroid.c b/sound/soc/samsung/odroid.c index c59273e2da2a..e95f3d3f0401 100644 --- a/sound/soc/samsung/odroid.c +++ b/sound/soc/samsung/odroid.c @@ -5,7 +5,6 @@ #include #include #include -#include #include #include #include diff --git a/sound/soc/samsung/snow.c b/sound/soc/samsung/snow.c index 7de6acb95701..aad0f9b4d4fc 100644 --- a/sound/soc/samsung/snow.c +++ b/sound/soc/samsung/snow.c @@ -6,7 +6,6 @@ #include #include #include -#include #include #include diff --git a/sound/soc/sh/fsi.c b/sound/soc/sh/fsi.c index d0931f4c9976..2ef47aa2c778 100644 --- a/sound/soc/sh/fsi.c +++ b/sound/soc/sh/fsi.c @@ -13,7 +13,6 @@ #include #include #include -#include #include #include #include diff --git a/sound/soc/sh/rcar/core.c b/sound/soc/sh/rcar/core.c index dd256bf7cdd4..0b1aa23c1189 100644 --- a/sound/soc/sh/rcar/core.c +++ b/sound/soc/sh/rcar/core.c @@ -91,6 +91,7 @@ */ #include +#include #include "rsnd.h" #define RSND_RATES SNDRV_PCM_RATE_8000_192000 diff --git a/sound/soc/sh/rcar/rsnd.h b/sound/soc/sh/rcar/rsnd.h index 43c0d675cc34..da716b1f52e4 100644 --- a/sound/soc/sh/rcar/rsnd.h +++ b/sound/soc/sh/rcar/rsnd.h @@ -14,9 +14,7 @@ #include #include #include -#include -#include -#include +#include #include #include #include diff --git a/sound/soc/sh/rcar/src.c b/sound/soc/sh/rcar/src.c index f832165e46bc..3241a1bdc9ea 100644 --- a/sound/soc/sh/rcar/src.c +++ b/sound/soc/sh/rcar/src.c @@ -22,6 +22,7 @@ * #define RSND_DEBUG_NO_IRQ_STATUS 1 */ +#include #include "rsnd.h" #define SRC_NAME "src" diff --git a/sound/soc/sh/rcar/ssi.c b/sound/soc/sh/rcar/ssi.c index 690ac0d6ef41..0a46aa1975fa 100644 --- a/sound/soc/sh/rcar/ssi.c +++ b/sound/soc/sh/rcar/ssi.c @@ -17,6 +17,8 @@ */ #include +#include +#include #include #include "rsnd.h" #define RSND_SSI_NAME_SIZE 16 diff --git a/sound/soc/sh/rz-ssi.c b/sound/soc/sh/rz-ssi.c index f5f102d878c7..14cf1a41fb0d 100644 --- a/sound/soc/sh/rz-ssi.c +++ b/sound/soc/sh/rz-ssi.c @@ -10,7 +10,6 @@ #include #include #include -#include #include #include #include diff --git a/sound/soc/sunxi/sun4i-codec.c b/sound/soc/sunxi/sun4i-codec.c index ad6336cefaea..a2618ed650b0 100644 --- a/sound/soc/sunxi/sun4i-codec.c +++ b/sound/soc/sunxi/sun4i-codec.c @@ -15,10 +15,6 @@ #include #include #include -#include -#include -#include -#include #include #include #include diff --git a/sound/soc/sunxi/sun4i-i2s.c b/sound/soc/sunxi/sun4i-i2s.c index 5124b6c9ceb4..a736f632bf0b 100644 --- a/sound/soc/sunxi/sun4i-i2s.c +++ b/sound/soc/sunxi/sun4i-i2s.c @@ -10,7 +10,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/sound/soc/sunxi/sun4i-spdif.c b/sound/soc/sunxi/sun4i-spdif.c index 199cfee41d31..702386823d17 100644 --- a/sound/soc/sunxi/sun4i-spdif.c +++ b/sound/soc/sunxi/sun4i-spdif.c @@ -14,8 +14,7 @@ #include #include #include -#include -#include +#include #include #include #include diff --git a/sound/soc/sunxi/sun50i-codec-analog.c b/sound/soc/sunxi/sun50i-codec-analog.c index e1e5e8de0130..8a32d05e23e1 100644 --- a/sound/soc/sunxi/sun50i-codec-analog.c +++ b/sound/soc/sunxi/sun50i-codec-analog.c @@ -13,9 +13,8 @@ #include #include +#include #include -#include -#include #include #include diff --git a/sound/soc/sunxi/sun50i-dmic.c b/sound/soc/sunxi/sun50i-dmic.c index 3f6fdab75b5f..c76628bc86c6 100644 --- a/sound/soc/sunxi/sun50i-dmic.c +++ b/sound/soc/sunxi/sun50i-dmic.c @@ -6,7 +6,7 @@ #include #include -#include +#include #include #include #include diff --git a/sound/soc/sunxi/sun8i-codec-analog.c b/sound/soc/sunxi/sun8i-codec-analog.c index be872eefa61e..445b34141896 100644 --- a/sound/soc/sunxi/sun8i-codec-analog.c +++ b/sound/soc/sunxi/sun8i-codec-analog.c @@ -10,7 +10,6 @@ #include #include #include -#include #include #include diff --git a/sound/soc/sunxi/sun8i-codec.c b/sound/soc/sunxi/sun8i-codec.c index 4c0d0d7d3e58..7b45ddffe990 100644 --- a/sound/soc/sunxi/sun8i-codec.c +++ b/sound/soc/sunxi/sun8i-codec.c @@ -13,7 +13,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/sound/soc/tegra/tegra186_asrc.c b/sound/soc/tegra/tegra186_asrc.c index 208e2fcefcf2..22af5135d77a 100644 --- a/sound/soc/tegra/tegra186_asrc.c +++ b/sound/soc/tegra/tegra186_asrc.c @@ -8,9 +8,8 @@ #include #include #include +#include #include -#include -#include #include #include #include diff --git a/sound/soc/tegra/tegra186_dspk.c b/sound/soc/tegra/tegra186_dspk.c index a0ce7eb11de9..aa37c4ab0adb 100644 --- a/sound/soc/tegra/tegra186_dspk.c +++ b/sound/soc/tegra/tegra186_dspk.c @@ -6,9 +6,9 @@ #include #include +#include #include #include -#include #include #include #include diff --git a/sound/soc/tegra/tegra20_spdif.c b/sound/soc/tegra/tegra20_spdif.c index b0670aa4d967..380011233eb1 100644 --- a/sound/soc/tegra/tegra20_spdif.c +++ b/sound/soc/tegra/tegra20_spdif.c @@ -10,8 +10,8 @@ #include #include #include +#include #include -#include #include #include #include diff --git a/sound/soc/tegra/tegra210_adx.c b/sound/soc/tegra/tegra210_adx.c index 7d003f0c8d0f..d2530443a221 100644 --- a/sound/soc/tegra/tegra210_adx.c +++ b/sound/soc/tegra/tegra210_adx.c @@ -7,9 +7,8 @@ #include #include #include +#include #include -#include -#include #include #include #include diff --git a/sound/soc/tegra/tegra210_dmic.c b/sound/soc/tegra/tegra210_dmic.c index 763b206cd52b..e53c0278ae9a 100644 --- a/sound/soc/tegra/tegra210_dmic.c +++ b/sound/soc/tegra/tegra210_dmic.c @@ -7,8 +7,8 @@ #include #include #include +#include #include -#include #include #include #include diff --git a/sound/soc/tegra/tegra210_i2s.c b/sound/soc/tegra/tegra210_i2s.c index 21724cd3525e..ba7fdd7405ac 100644 --- a/sound/soc/tegra/tegra210_i2s.c +++ b/sound/soc/tegra/tegra210_i2s.c @@ -6,8 +6,8 @@ #include #include +#include #include -#include #include #include #include diff --git a/sound/soc/tegra/tegra210_mixer.c b/sound/soc/tegra/tegra210_mixer.c index 035e9035b533..024614f6ec0b 100644 --- a/sound/soc/tegra/tegra210_mixer.c +++ b/sound/soc/tegra/tegra210_mixer.c @@ -7,9 +7,8 @@ #include #include #include +#include #include -#include -#include #include #include #include diff --git a/sound/soc/tegra/tegra210_mvc.c b/sound/soc/tegra/tegra210_mvc.c index 44f465e11bee..b89f5edafa03 100644 --- a/sound/soc/tegra/tegra210_mvc.c +++ b/sound/soc/tegra/tegra210_mvc.c @@ -7,9 +7,8 @@ #include #include #include +#include #include -#include -#include #include #include #include diff --git a/sound/soc/tegra/tegra210_ope.c b/sound/soc/tegra/tegra210_ope.c index 98e726432615..136ed17f3650 100644 --- a/sound/soc/tegra/tegra210_ope.c +++ b/sound/soc/tegra/tegra210_ope.c @@ -7,9 +7,8 @@ #include #include #include +#include #include -#include -#include #include #include #include diff --git a/sound/soc/tegra/tegra210_peq.c b/sound/soc/tegra/tegra210_peq.c index 205d956abb42..bd8007cc49e1 100644 --- a/sound/soc/tegra/tegra210_peq.c +++ b/sound/soc/tegra/tegra210_peq.c @@ -10,7 +10,6 @@ #include #include #include -#include #include #include #include diff --git a/sound/soc/tegra/tegra210_sfc.c b/sound/soc/tegra/tegra210_sfc.c index c2240babd601..028747c44f37 100644 --- a/sound/soc/tegra/tegra210_sfc.c +++ b/sound/soc/tegra/tegra210_sfc.c @@ -9,7 +9,6 @@ #include #include #include -#include #include #include #include diff --git a/sound/soc/tegra/tegra30_i2s.c b/sound/soc/tegra/tegra30_i2s.c index 81eaece51130..a8ff51d12edb 100644 --- a/sound/soc/tegra/tegra30_i2s.c +++ b/sound/soc/tegra/tegra30_i2s.c @@ -19,7 +19,6 @@ #include #include #include -#include #include #include #include diff --git a/sound/soc/tegra/tegra_asoc_machine.c b/sound/soc/tegra/tegra_asoc_machine.c index 0e75c6d5c0c5..3caadee9584f 100644 --- a/sound/soc/tegra/tegra_asoc_machine.c +++ b/sound/soc/tegra/tegra_asoc_machine.c @@ -8,7 +8,6 @@ #include #include #include -#include #include #include diff --git a/sound/soc/tegra/tegra_audio_graph_card.c b/sound/soc/tegra/tegra_audio_graph_card.c index 27e9f41188b4..8b48813c2c59 100644 --- a/sound/soc/tegra/tegra_audio_graph_card.c +++ b/sound/soc/tegra/tegra_audio_graph_card.c @@ -6,7 +6,7 @@ #include #include -#include +#include #include #include #include diff --git a/sound/soc/ti/omap-dmic.c b/sound/soc/ti/omap-dmic.c index 5b5eccf303ab..fb92bb88eb5c 100644 --- a/sound/soc/ti/omap-dmic.c +++ b/sound/soc/ti/omap-dmic.c @@ -11,6 +11,7 @@ */ #include +#include #include #include #include @@ -18,7 +19,6 @@ #include #include #include -#include #include #include diff --git a/sound/soc/ti/omap-mcpdm.c b/sound/soc/ti/omap-mcpdm.c index 2b97f2e4f185..1a5d19937c64 100644 --- a/sound/soc/ti/omap-mcpdm.c +++ b/sound/soc/ti/omap-mcpdm.c @@ -11,6 +11,7 @@ */ #include +#include #include #include #include @@ -19,7 +20,6 @@ #include #include #include -#include #include #include From patchwork Fri Oct 6 20:09:11 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rob Herring X-Patchwork-Id: 149390 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:a888:0:b0:403:3b70:6f57 with SMTP id x8csp570260vqo; Fri, 6 Oct 2023 13:10:27 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFlo7xKp06BW52g1+KhdI4fKHxFT2SIwbF0U6FrLnySTag3mOeeU6gfeLE4zNB5gulFSgD5 X-Received: by 2002:a17:90b:46c7:b0:277:4b68:b93c with SMTP id jx7-20020a17090b46c700b002774b68b93cmr9096538pjb.4.1696623027009; Fri, 06 Oct 2023 13:10:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1696623026; cv=none; d=google.com; s=arc-20160816; b=nAoZhA0kdE5HjhVQ9VL4sia0yQt5aeoj1nQpH+YizGEnvhLxwHtpsV++n2zuP/paHX bqbnIggVuA3MKoFMKsX82lNVAdUuW3FUMKn4gjzGsWdEmp3ELVEcsixADBwibPE6mRqQ 9YHvL6KkHV7oMQYsvCYVwIC9YnvHMVMAoH3EFb9gE8IESuxbEZDoUp0MJeCLPXERgw92 xz4cxGQFmBeEz/PB/KiJWKS/iCS7cjL8NV5D+L7hHhfjV51+CW/zx2HFkw5ehOPss+sc 7x3tAOUuWZq4fhhhDohjaVU/EzqSEiCairiTecBIP8nWZk+kNUPBUz1lkEOg5NHJiCOV ezJA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:in-reply-to:references:message-id :content-transfer-encoding:mime-version:subject:date:from; bh=ZZOch+WDqofN+3QITjE4l0oM3GunXyt8y2cN5QknfSQ=; fh=WS2zAkXwa/jMVS9GpKyo4Oby25TrfObQF36eIgdo4ro=; b=ahkwELkIcJe5Nengd+v5RiUAIAD3HimgYZHJoXVI3Eqa768e8/OZGnQGRxmalSgqvY 5KY8h62rKDZyxchKtgCS03gBA34wIt8CP4iOOnbL7zKOSOH5NBH6yJT7ATZYa6biHVjM szjfDAIJ75pga0/9+YFgtWWwsckoRlSNzB6F17LGfq9fM/7jfehJhYxdnwVBg71lJjTB jIyZ1fwb+YoMpGQXMNbDaU8WFyocwPsosizmWIPWpCxW1MCe/lHTPrFsDUviSvNcGzqt VrP7SIKMxTllufuiS6BPVGH2tD75IRXZ3s6LtFvNOxSl2fdkkO6DoeQ22JcugIW9pjew wiGg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:5 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from groat.vger.email (groat.vger.email. [2620:137:e000::3:5]) by mx.google.com with ESMTPS id w20-20020a17090aea1400b00274cd766a42si2788385pjy.171.2023.10.06.13.10.26 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 06 Oct 2023 13:10:26 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:5 as permitted sender) client-ip=2620:137:e000::3:5; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:5 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by groat.vger.email (Postfix) with ESMTP id 2C1BD834767E; Fri, 6 Oct 2023 13:10:15 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at groat.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233429AbjJFUJt (ORCPT + 18 others); Fri, 6 Oct 2023 16:09:49 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60998 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233421AbjJFUJl (ORCPT ); Fri, 6 Oct 2023 16:09:41 -0400 Received: from mail-ot1-f54.google.com (mail-ot1-f54.google.com [209.85.210.54]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D9594CA for ; Fri, 6 Oct 2023 13:09:39 -0700 (PDT) Received: by mail-ot1-f54.google.com with SMTP id 46e09a7af769-6c4e7951dddso1615912a34.1 for ; Fri, 06 Oct 2023 13:09:39 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1696622979; x=1697227779; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=ZZOch+WDqofN+3QITjE4l0oM3GunXyt8y2cN5QknfSQ=; b=gcffyZZdGLaqLIiXqFloqhJfX4cOggdIW1DOWlq6k2p0rBErXmu4cNFmAoXM4c1d2A b3Pal3moSH8FS5N8idU7AsAtnl6aFyCDSP52eSaomriNbcAz6ptqoXKhiGGFQyrsVaAY 54EJIlvEOHgZ1nPfIQekuFiowsCtgq5ZPa2owIifWBWJf1Ydr/3MPobYgdaLFHth4NgO lkkmSfMkMKHa3t/nC8CZZeJJRLeG4FHLMvbxJgeOZcjdKN1KLWnjsNo0w44Aj9wQcRNT Xin123G2NAFoCf36o2bYQ3wyooN62gCHdS9fkfKPJI8gVEpqonCJMHAIpONBNlvD/Cbs wnAQ== X-Gm-Message-State: AOJu0YziFyvnPiQgP3zE0fZbbCTzsv8XsS4JW3FOL35z555JTsIrR1Cu 5+FwVcmWtlbzBM0QGqqm+g== X-Received: by 2002:a9d:6210:0:b0:6b9:b0f6:eab8 with SMTP id g16-20020a9d6210000000b006b9b0f6eab8mr9353110otj.5.1696622979060; Fri, 06 Oct 2023 13:09:39 -0700 (PDT) Received: from robh_at_kernel.org (66-90-144-107.dyn.grandenetworks.net. [66.90.144.107]) by smtp.gmail.com with ESMTPSA id r12-20020a9d750c000000b006c61c098d38sm680849otk.21.2023.10.06.13.09.36 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 06 Oct 2023 13:09:38 -0700 (PDT) Received: (nullmailer pid 229127 invoked by uid 1000); Fri, 06 Oct 2023 20:09:30 -0000 From: Rob Herring Date: Fri, 06 Oct 2023 15:09:11 -0500 Subject: [PATCH v3 2/5] ASoC: Drop unnecessary of_match_device() calls MIME-Version: 1.0 Message-Id: <20231006-dt-asoc-header-cleanups-v3-2-13a4f0f7fee6@kernel.org> References: <20231006-dt-asoc-header-cleanups-v3-0-13a4f0f7fee6@kernel.org> In-Reply-To: <20231006-dt-asoc-header-cleanups-v3-0-13a4f0f7fee6@kernel.org> To: Mark Brown , Claudiu Beznea , Jaroslav Kysela , Takashi Iwai , Peter Rosin , Lars-Peter Clausen , nuno.sa@analog.com, James Schulman , David Rhodes , Richard Fitzgerald , AngeloGioacchino Del Regno , Shenghao Ding , Kevin Lu , Baojun Xu , Oder Chiou , Fabio Estevam , Kiseok Jo , Kevin Cernekee , Shengjiu Wang , Xiubo Li , Nicolin Chen , Srinivas Kandagatla , Banajit Goswami , Nicolas Frattaroli , Sylwester Nawrocki , Ban Tao , Peter Ujfalusi , Jarkko Nikula , Cezary Rojewski , Pierre-Louis Bossart , Peter Ujfalusi , Bard Liao , Ranjani Sridharan , Kai Vehmanen , Olivier Moysan , Arnaud Pouliquen , Maxime Coquelin , Alexandre Torgue Cc: alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, Charles Keepax X-Mailer: b4 0.13-dev X-Spam-Status: No, score=2.6 required=5.0 tests=MAILING_LIST_MULTI, RCVD_IN_SBL_CSS,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on groat.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (groat.vger.email [0.0.0.0]); Fri, 06 Oct 2023 13:10:15 -0700 (PDT) X-Spam-Level: ** X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1779038187317582671 X-GMAIL-MSGID: 1779038187317582671 If probe is reached, we've already matched the device and in the case of DT matching, the struct device_node pointer will be set. Therefore, there is no need to call of_match_device() in probe. Acked-by: Charles Keepax Signed-off-by: Rob Herring --- sound/soc/codecs/ak5386.c | 7 ++----- sound/soc/codecs/cs4271.c | 22 ++++++---------------- sound/soc/codecs/tas5086.c | 6 +----- 3 files changed, 9 insertions(+), 26 deletions(-) diff --git a/sound/soc/codecs/ak5386.c b/sound/soc/codecs/ak5386.c index 0c5e00679c7d..21a44476f48d 100644 --- a/sound/soc/codecs/ak5386.c +++ b/sound/soc/codecs/ak5386.c @@ -10,7 +10,6 @@ #include #include #include -#include #include #include #include @@ -168,7 +167,6 @@ static int ak5386_probe(struct platform_device *pdev) if (!priv) return -ENOMEM; - priv->reset_gpio = -EINVAL; dev_set_drvdata(dev, priv); for (i = 0; i < ARRAY_SIZE(supply_names); i++) @@ -179,9 +177,8 @@ static int ak5386_probe(struct platform_device *pdev) if (ret < 0) return ret; - if (of_match_device(of_match_ptr(ak5386_dt_ids), dev)) - priv->reset_gpio = of_get_named_gpio(dev->of_node, - "reset-gpio", 0); + priv->reset_gpio = of_get_named_gpio(dev->of_node, + "reset-gpio", 0); if (gpio_is_valid(priv->reset_gpio)) if (devm_gpio_request_one(dev, priv->reset_gpio, diff --git a/sound/soc/codecs/cs4271.c b/sound/soc/codecs/cs4271.c index 188b8b43c524..9e6f8a048dd5 100644 --- a/sound/soc/codecs/cs4271.c +++ b/sound/soc/codecs/cs4271.c @@ -15,7 +15,6 @@ #include #include #include -#include #include #include #include @@ -563,19 +562,12 @@ static int cs4271_component_probe(struct snd_soc_component *component) struct cs4271_private *cs4271 = snd_soc_component_get_drvdata(component); struct cs4271_platform_data *cs4271plat = component->dev->platform_data; int ret; - bool amutec_eq_bmutec = false; + bool amutec_eq_bmutec; -#ifdef CONFIG_OF - if (of_match_device(cs4271_dt_ids, component->dev)) { - if (of_get_property(component->dev->of_node, - "cirrus,amutec-eq-bmutec", NULL)) - amutec_eq_bmutec = true; - - if (of_get_property(component->dev->of_node, - "cirrus,enable-soft-reset", NULL)) - cs4271->enable_soft_reset = true; - } -#endif + amutec_eq_bmutec = of_property_read_bool(component->dev->of_node, + "cirrus,amutec-eq-bmutec"); + cs4271->enable_soft_reset = of_property_read_bool(component->dev->of_node, + "cirrus,enable-soft-reset"); ret = regulator_bulk_enable(ARRAY_SIZE(cs4271->supplies), cs4271->supplies); @@ -655,9 +647,7 @@ static int cs4271_common_probe(struct device *dev, if (!cs4271) return -ENOMEM; - if (of_match_device(cs4271_dt_ids, dev)) - cs4271->gpio_nreset = - of_get_named_gpio(dev->of_node, "reset-gpio", 0); + cs4271->gpio_nreset = of_get_named_gpio(dev->of_node, "reset-gpio", 0); if (cs4271plat) cs4271->gpio_nreset = cs4271plat->gpio_nreset; diff --git a/sound/soc/codecs/tas5086.c b/sound/soc/codecs/tas5086.c index 60e59e993ba6..f52c14b43f28 100644 --- a/sound/soc/codecs/tas5086.c +++ b/sound/soc/codecs/tas5086.c @@ -940,11 +940,7 @@ static int tas5086_i2c_probe(struct i2c_client *i2c) i2c_set_clientdata(i2c, priv); - if (of_match_device(of_match_ptr(tas5086_dt_ids), dev)) { - struct device_node *of_node = dev->of_node; - gpio_nreset = of_get_named_gpio(of_node, "reset-gpio", 0); - } - + gpio_nreset = of_get_named_gpio(dev->of_node, "reset-gpio", 0); if (gpio_is_valid(gpio_nreset)) if (devm_gpio_request(dev, gpio_nreset, "TAS5086 Reset")) gpio_nreset = -EINVAL; From patchwork Fri Oct 6 20:09:12 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rob Herring X-Patchwork-Id: 149389 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:a888:0:b0:403:3b70:6f57 with SMTP id x8csp570183vqo; Fri, 6 Oct 2023 13:10:18 -0700 (PDT) X-Google-Smtp-Source: AGHT+IH1MnhWARSNR2CFzffnTOf3keVIN7vUftXAM9Fq+vVxMdFz0+ZMVmlBL0QvI777bHmaFYyW X-Received: by 2002:a17:902:724a:b0:1bb:3979:d467 with SMTP id c10-20020a170902724a00b001bb3979d467mr8386441pll.63.1696623018774; Fri, 06 Oct 2023 13:10:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1696623018; cv=none; d=google.com; s=arc-20160816; b=MEHpNh9Dna782ffiKTZ7rFU9jEg4SMv9WUn/amZLEX3K6Z3soRgCPCTtfcHC8abWCO ckuDymp3CmknGbcCO4MjSicI54CvUU6z6qyniKHI3LbY2brtyp1Su31vj6LMCZOySbpC Lw6eeCQA6Hdv9Zy3QnXwJ+3ATuvY+lN/91tDsHSGfX/psYWwK1W9zAfBM9ZI2eIPovOR Zzi1x26eXaLL663Dz5RsHKc7WpRpIG+yPkqSlENBbc2qfrjI/1x0bgSp8mb2OqfSGFAX NiRlIljcncqsJiOCowq8eN7XjdlPzuoRXHaliZy67aXywffEGznYqryq1+6xegJqfi9g AYUA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:in-reply-to:references:message-id :content-transfer-encoding:mime-version:subject:date:from; bh=A+OCongk6Hb4BlpU4QfeNnEcgzo8GaBxo0N0PgFWYnw=; fh=IJ32rODLot8WzKyM5hJwYaHKfXI1FHqM5tEDV9+u21c=; b=eft6ukElU7mntvdIMeGi+Z99ZKgvV10GTz07phul1U5VLeqSCxegGt6RAWC+k2ge40 t1TlrJMLWqiGbQoxtmbwz9mHP40I3UJVcRlGo1t4/Rtuf+yRxQ2I6Msn0F5/O0eUb6hg I5NCesoPBvVB2052WS01naoeDVSEV8yfsSH6UlY9N5iUUW8TL2OFFv/XTUnbw86momLx lV6Ii/pxZ89iSBLPhTI0fGOIqADuYMisLwERiruLV19v0m6ayVoa+mFwmYVO5R7UqG5U PP73G1xkHAkiMahVVwV8kKiqXP65FGJ/uiptRywBUMC1qc7BTN4V0pgXGNgDtx5kwr8n TLyw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from snail.vger.email (snail.vger.email. [23.128.96.37]) by mx.google.com with ESMTPS id kz15-20020a170902f9cf00b001c730c865f8si4008286plb.320.2023.10.06.13.10.18 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 06 Oct 2023 13:10:18 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) client-ip=23.128.96.37; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by snail.vger.email (Postfix) with ESMTP id F3213837B2E3; Fri, 6 Oct 2023 13:10:17 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at snail.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233443AbjJFUKD (ORCPT + 18 others); Fri, 6 Oct 2023 16:10:03 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53932 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233427AbjJFUJv (ORCPT ); Fri, 6 Oct 2023 16:09:51 -0400 Received: from mail-ot1-f51.google.com (mail-ot1-f51.google.com [209.85.210.51]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A4499D6 for ; Fri, 6 Oct 2023 13:09:48 -0700 (PDT) Received: by mail-ot1-f51.google.com with SMTP id 46e09a7af769-6c7b3adbeb6so1707582a34.0 for ; Fri, 06 Oct 2023 13:09:48 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1696622987; x=1697227787; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=A+OCongk6Hb4BlpU4QfeNnEcgzo8GaBxo0N0PgFWYnw=; b=oYPGhqSWudq4DSh55FD4pGl9PfMRvlyV7uewGpdEmK5J2jT8iMQM3HbSe5+od+8/p/ ILu4kNB2H0P6yX0RH5+sbsoZ0QTy+I3SJBfbGFrZCE5wH6UYE1zaAJ3Frxa7UOpzTnPN mOCtLkGYXH6ztsPD/7YX+++3eri1TEA0lqAjMvuQ5vkn9Pegwts9AajpQss8EB77U1vG Yg0KNu/R/OM715LoHnaMfktzqlbk33A9t1sw6LrwLVdtXKtQ6Z4SFPCxi4KVMtDrTCMJ zIWbbgeVCG0tRyKx1+Q+CgURsLi5qjQmLW5FOMOTOCitf+rLKo6I/MY+YDgzdRpbOwhW iuXA== X-Gm-Message-State: AOJu0Yyb9R9l2m0fxaFWIugtgIgccZKy2GN8tzSlH+Hd3BBR52NcXacw K2NR6DRLKIMHkpWHtpbjvA== X-Received: by 2002:a05:6830:1502:b0:6bf:1f5f:ed18 with SMTP id k2-20020a056830150200b006bf1f5fed18mr8505526otp.1.1696622987671; Fri, 06 Oct 2023 13:09:47 -0700 (PDT) Received: from robh_at_kernel.org (66-90-144-107.dyn.grandenetworks.net. [66.90.144.107]) by smtp.gmail.com with ESMTPSA id v8-20020a9d7d08000000b006c4be829aa8sm679959otn.44.2023.10.06.13.09.45 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 06 Oct 2023 13:09:47 -0700 (PDT) Received: (nullmailer pid 229129 invoked by uid 1000); Fri, 06 Oct 2023 20:09:30 -0000 From: Rob Herring Date: Fri, 06 Oct 2023 15:09:12 -0500 Subject: [PATCH v3 3/5] ASoC: da7218: Use i2c_get_match_data() MIME-Version: 1.0 Message-Id: <20231006-dt-asoc-header-cleanups-v3-3-13a4f0f7fee6@kernel.org> References: <20231006-dt-asoc-header-cleanups-v3-0-13a4f0f7fee6@kernel.org> In-Reply-To: <20231006-dt-asoc-header-cleanups-v3-0-13a4f0f7fee6@kernel.org> To: Mark Brown , Claudiu Beznea , Jaroslav Kysela , Takashi Iwai , Peter Rosin , Lars-Peter Clausen , nuno.sa@analog.com, James Schulman , David Rhodes , Richard Fitzgerald , AngeloGioacchino Del Regno , Shenghao Ding , Kevin Lu , Baojun Xu , Oder Chiou , Fabio Estevam , Kiseok Jo , Kevin Cernekee , Shengjiu Wang , Xiubo Li , Nicolin Chen , Srinivas Kandagatla , Banajit Goswami , Nicolas Frattaroli , Sylwester Nawrocki , Ban Tao , Peter Ujfalusi , Jarkko Nikula , Cezary Rojewski , Pierre-Louis Bossart , Peter Ujfalusi , Bard Liao , Ranjani Sridharan , Kai Vehmanen , Olivier Moysan , Arnaud Pouliquen , Maxime Coquelin , Alexandre Torgue Cc: alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org, linuxppc-dev@lists.ozlabs.org X-Mailer: b4 0.13-dev X-Spam-Status: No, score=-1.1 required=5.0 tests=BAYES_00, FREEMAIL_ENVFROM_END_DIGIT,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (snail.vger.email [0.0.0.0]); Fri, 06 Oct 2023 13:10:18 -0700 (PDT) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1779038178765204165 X-GMAIL-MSGID: 1779038178765204165 Use preferred i2c_get_match_data() instead of of_match_device() and i2c_match_id() to get the driver match data. With this, adjust the includes to explicitly include the correct headers. Avoid using 0 for enum da7218_dev_id so that no match data can be distinguished. Signed-off-by: Rob Herring --- sound/soc/codecs/da7218.c | 29 ++--------------------------- sound/soc/codecs/da7218.h | 2 +- 2 files changed, 3 insertions(+), 28 deletions(-) diff --git a/sound/soc/codecs/da7218.c b/sound/soc/codecs/da7218.c index 3f456b08b809..8aacd7350798 100644 --- a/sound/soc/codecs/da7218.c +++ b/sound/soc/codecs/da7218.c @@ -9,7 +9,7 @@ #include #include -#include +#include #include #include #include @@ -2285,16 +2285,6 @@ static const struct of_device_id da7218_of_match[] = { }; MODULE_DEVICE_TABLE(of, da7218_of_match); -static inline int da7218_of_get_id(struct device *dev) -{ - const struct of_device_id *id = of_match_device(da7218_of_match, dev); - - if (id) - return (uintptr_t)id->data; - else - return -EINVAL; -} - static enum da7218_micbias_voltage da7218_of_micbias_lvl(struct snd_soc_component *component, u32 val) { @@ -3253,18 +3243,6 @@ static const struct regmap_config da7218_regmap_config = { * I2C layer */ -static const struct i2c_device_id da7218_i2c_id[]; - -static inline int da7218_i2c_get_id(struct i2c_client *i2c) -{ - const struct i2c_device_id *id = i2c_match_id(da7218_i2c_id, i2c); - - if (id) - return (uintptr_t)id->driver_data; - else - return -EINVAL; -} - static int da7218_i2c_probe(struct i2c_client *i2c) { struct da7218_priv *da7218; @@ -3276,10 +3254,7 @@ static int da7218_i2c_probe(struct i2c_client *i2c) i2c_set_clientdata(i2c, da7218); - if (i2c->dev.of_node) - da7218->dev_id = da7218_of_get_id(&i2c->dev); - else - da7218->dev_id = da7218_i2c_get_id(i2c); + da7218->dev_id = (uintptr_t)i2c_get_match_data(i2c); if ((da7218->dev_id != DA7217_DEV_ID) && (da7218->dev_id != DA7218_DEV_ID)) { diff --git a/sound/soc/codecs/da7218.h b/sound/soc/codecs/da7218.h index 9ac2892092b5..7f6a4aea2c7a 100644 --- a/sound/soc/codecs/da7218.h +++ b/sound/soc/codecs/da7218.h @@ -1369,7 +1369,7 @@ enum da7218_sys_clk { }; enum da7218_dev_id { - DA7217_DEV_ID = 0, + DA7217_DEV_ID = 1, DA7218_DEV_ID, }; From patchwork Fri Oct 6 20:09:13 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rob Herring X-Patchwork-Id: 149388 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:a888:0:b0:403:3b70:6f57 with SMTP id x8csp570141vqo; Fri, 6 Oct 2023 13:10:14 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHAZfDcRgY+GX8Ip+1+LL+Z3I/uT3c58BBOhAxbyYEVfJbW+iRSXIPDnUzqw58oPA4xegwN X-Received: by 2002:a05:6a00:179a:b0:68e:4587:3da8 with SMTP id s26-20020a056a00179a00b0068e45873da8mr10975764pfg.21.1696623013634; Fri, 06 Oct 2023 13:10:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1696623013; cv=none; d=google.com; s=arc-20160816; b=fDSLGhVBvyDA46/sJVrb3DqKuhv+VQqyoJnhHuTaYzuj6NwC+SPFOQzwFqNfu8Ta+K KHlZp7jnX5HGJeGuQAaMhFKg6EpRQve1/SoUPG09ziGAYb6nQpr30TxTJEtlzAzChHJ6 DuwMBFWB/O+0GqEihrCIha7u/qBsK3W6Z6V2onvh1Kex0ld+NvhLPnePCRB8tcEpHg28 BQFxocC0vITdo5Srkm3uPrF3ddF5pcro8y+ntbXceUziUbJkL/LHv6UfBO+BH4ekHimN BcJFsk5wrTDrEFXEVIh8TZtYEjHJ08Jjr5ssWXmLTC/Z9RpFRxHMnZ1eOKzaBaT6wrH5 acJw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:in-reply-to:references:message-id :content-transfer-encoding:mime-version:subject:date:from; bh=bL8rZuds0InwfAgmwqZ+dnEQFUrXFZIZ0D2N8qSZFiI=; fh=IJ32rODLot8WzKyM5hJwYaHKfXI1FHqM5tEDV9+u21c=; b=YoD6G2RFGrozk0tndidcMoVUK5ZWNz8Ay6nNS0iErkntBJY4PVBNn63rI4Etdsg4+/ 1S7uh4v0dMnA6QKGwbDZrr5U6RyFT0OEoWE3v5PvWXiXZJKhrgb9OQA9nJVnCijnBx6L xM9Tfff+TIOZTArgweW95D2DW7cIwtJJ5wip6in3poe5hP5zFloUr+KjwESUHVZGTE9t ltPCKFWHkAJGHvc1MAh06bICDXkLX3RqPLQDGYQ486eRvjEEhYDOFLYyz2mRBn2JR5HD I7nUPU72/IxEFhaPYxMx5TiDc5mY3Il4muzBoLPqr6qIzU60L684CB/yXbt2TTgkrS1N H5/w== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from snail.vger.email (snail.vger.email. [2620:137:e000::3:7]) by mx.google.com with ESMTPS id bs64-20020a632843000000b0057047d68821si4369584pgb.565.2023.10.06.13.10.13 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 06 Oct 2023 13:10:13 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) client-ip=2620:137:e000::3:7; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by snail.vger.email (Postfix) with ESMTP id E4A6D837B2DA; Fri, 6 Oct 2023 13:10:12 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at snail.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233453AbjJFUJ7 (ORCPT + 18 others); Fri, 6 Oct 2023 16:09:59 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53888 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233424AbjJFUJu (ORCPT ); Fri, 6 Oct 2023 16:09:50 -0400 Received: from mail-oa1-f54.google.com (mail-oa1-f54.google.com [209.85.160.54]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 552D810E for ; Fri, 6 Oct 2023 13:09:46 -0700 (PDT) Received: by mail-oa1-f54.google.com with SMTP id 586e51a60fabf-1e5602c12e5so1353747fac.3 for ; Fri, 06 Oct 2023 13:09:46 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1696622985; x=1697227785; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=bL8rZuds0InwfAgmwqZ+dnEQFUrXFZIZ0D2N8qSZFiI=; b=dvASI00E83/6BsnZrs5fDuM4GwFUQ5YS6XFXAvOCMnSsyCiR7Be6v5VpoXVPJzxBPI aC5x4dBIEwEG0nzZNqzi4wT8Yyc0aXq3fLpB8ligWpq1LiK3i88CqZTQwCjHV0Yzbs/v MaFaxVZDf+wD+p00t7hEwo52AyxMDwvy6q6qNnrJmXJWOC+lgGS5sqdnU3vx3LKsq+4w TPwjc+8zeWnPsBofjuW3S3beBisjo7qlOkVjRvCGHZQ2Nrx4xGDsnR4eTSDiQgzLQ8aw v9+fcJ+ojvfeNeil3Gdg7f3Q/IiGbLqmNFQYAqIltY9nKIz3v0A1uvzh3pIDCAGNkM1k KpTA== X-Gm-Message-State: AOJu0YwEtatSFnUBu+RjpUjumKo1HhP+mV7mBh1FJSzKi+ex4AvU2aW8 myoqM1H+1zmReWNmQQZaZg== X-Received: by 2002:a05:6870:41ce:b0:1be:d61b:f41c with SMTP id z14-20020a05687041ce00b001bed61bf41cmr11577745oac.12.1696622985249; Fri, 06 Oct 2023 13:09:45 -0700 (PDT) Received: from robh_at_kernel.org (66-90-144-107.dyn.grandenetworks.net. [66.90.144.107]) by smtp.gmail.com with ESMTPSA id s10-20020a056870628a00b001e12f685592sm874367oan.13.2023.10.06.13.09.42 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 06 Oct 2023 13:09:44 -0700 (PDT) Received: (nullmailer pid 229131 invoked by uid 1000); Fri, 06 Oct 2023 20:09:30 -0000 From: Rob Herring Date: Fri, 06 Oct 2023 15:09:13 -0500 Subject: [PATCH v3 4/5] ASoC: qcom/lpass: Constify struct lpass_variant MIME-Version: 1.0 Message-Id: <20231006-dt-asoc-header-cleanups-v3-4-13a4f0f7fee6@kernel.org> References: <20231006-dt-asoc-header-cleanups-v3-0-13a4f0f7fee6@kernel.org> In-Reply-To: <20231006-dt-asoc-header-cleanups-v3-0-13a4f0f7fee6@kernel.org> To: Mark Brown , Claudiu Beznea , Jaroslav Kysela , Takashi Iwai , Peter Rosin , Lars-Peter Clausen , nuno.sa@analog.com, James Schulman , David Rhodes , Richard Fitzgerald , AngeloGioacchino Del Regno , Shenghao Ding , Kevin Lu , Baojun Xu , Oder Chiou , Fabio Estevam , Kiseok Jo , Kevin Cernekee , Shengjiu Wang , Xiubo Li , Nicolin Chen , Srinivas Kandagatla , Banajit Goswami , Nicolas Frattaroli , Sylwester Nawrocki , Ban Tao , Peter Ujfalusi , Jarkko Nikula , Cezary Rojewski , Pierre-Louis Bossart , Peter Ujfalusi , Bard Liao , Ranjani Sridharan , Kai Vehmanen , Olivier Moysan , Arnaud Pouliquen , Maxime Coquelin , Alexandre Torgue Cc: alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org, linuxppc-dev@lists.ozlabs.org X-Mailer: b4 0.13-dev X-Spam-Status: No, score=-1.1 required=5.0 tests=BAYES_00, FREEMAIL_ENVFROM_END_DIGIT,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,RCVD_IN_DNSWL_BLOCKED,RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (snail.vger.email [0.0.0.0]); Fri, 06 Oct 2023 13:10:12 -0700 (PDT) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1779038173313959596 X-GMAIL-MSGID: 1779038173313959596 'struct lpass_variant' is used for driver match data which is supposed to be constant. It's not modified anywhere, so it's just a matter of adding 'const' everywhere. Signed-off-by: Rob Herring --- sound/soc/qcom/lpass-apq8016.c | 6 +++--- sound/soc/qcom/lpass-cdc-dma.c | 2 +- sound/soc/qcom/lpass-cpu.c | 28 ++++++++++++++-------------- sound/soc/qcom/lpass-ipq806x.c | 2 +- sound/soc/qcom/lpass-platform.c | 36 ++++++++++++++++++------------------ sound/soc/qcom/lpass-sc7180.c | 6 +++--- sound/soc/qcom/lpass-sc7280.c | 6 +++--- sound/soc/qcom/lpass.h | 2 +- 8 files changed, 44 insertions(+), 44 deletions(-) diff --git a/sound/soc/qcom/lpass-apq8016.c b/sound/soc/qcom/lpass-apq8016.c index f919d46e18ca..8ce75b442b64 100644 --- a/sound/soc/qcom/lpass-apq8016.c +++ b/sound/soc/qcom/lpass-apq8016.c @@ -123,7 +123,7 @@ static struct snd_soc_dai_driver apq8016_lpass_cpu_dai_driver[] = { static int apq8016_lpass_alloc_dma_channel(struct lpass_data *drvdata, int direction, unsigned int dai_id) { - struct lpass_variant *v = drvdata->variant; + const struct lpass_variant *v = drvdata->variant; int chan = 0; if (direction == SNDRV_PCM_STREAM_PLAYBACK) { @@ -157,7 +157,7 @@ static int apq8016_lpass_free_dma_channel(struct lpass_data *drvdata, int chan, static int apq8016_lpass_init(struct platform_device *pdev) { struct lpass_data *drvdata = platform_get_drvdata(pdev); - struct lpass_variant *variant = drvdata->variant; + const struct lpass_variant *variant = drvdata->variant; struct device *dev = &pdev->dev; int ret, i; @@ -223,7 +223,7 @@ static int apq8016_lpass_exit(struct platform_device *pdev) } -static struct lpass_variant apq8016_data = { +static const struct lpass_variant apq8016_data = { .i2sctrl_reg_base = 0x1000, .i2sctrl_reg_stride = 0x1000, .i2s_ports = 4, diff --git a/sound/soc/qcom/lpass-cdc-dma.c b/sound/soc/qcom/lpass-cdc-dma.c index 8221e2cbe35c..6389c7b6051e 100644 --- a/sound/soc/qcom/lpass-cdc-dma.c +++ b/sound/soc/qcom/lpass-cdc-dma.c @@ -37,7 +37,7 @@ static void __lpass_get_dmactl_handle(struct snd_pcm_substream *substream, struc struct lpass_data *drvdata = snd_soc_dai_get_drvdata(dai); struct snd_pcm_runtime *rt = substream->runtime; struct lpass_pcm_data *pcm_data = rt->private_data; - struct lpass_variant *v = drvdata->variant; + const struct lpass_variant *v = drvdata->variant; unsigned int dai_id = cpu_dai->driver->id; switch (dai_id) { diff --git a/sound/soc/qcom/lpass-cpu.c b/sound/soc/qcom/lpass-cpu.c index 39571fed4001..18aff2654f89 100644 --- a/sound/soc/qcom/lpass-cpu.c +++ b/sound/soc/qcom/lpass-cpu.c @@ -44,7 +44,7 @@ static int lpass_cpu_init_i2sctl_bitfields(struct device *dev, struct lpaif_i2sctl *i2sctl, struct regmap *map) { struct lpass_data *drvdata = dev_get_drvdata(dev); - struct lpass_variant *v = drvdata->variant; + const struct lpass_variant *v = drvdata->variant; i2sctl->loopback = devm_regmap_field_alloc(dev, map, v->loopback); i2sctl->spken = devm_regmap_field_alloc(dev, map, v->spken); @@ -463,7 +463,7 @@ static int asoc_qcom_of_xlate_dai_name(struct snd_soc_component *component, const char **dai_name) { struct lpass_data *drvdata = snd_soc_component_get_drvdata(component); - struct lpass_variant *variant = drvdata->variant; + const struct lpass_variant *variant = drvdata->variant; int id = args->args[0]; int ret = -EINVAL; int i; @@ -488,7 +488,7 @@ static const struct snd_soc_component_driver lpass_cpu_comp_driver = { static bool lpass_cpu_regmap_writeable(struct device *dev, unsigned int reg) { struct lpass_data *drvdata = dev_get_drvdata(dev); - struct lpass_variant *v = drvdata->variant; + const struct lpass_variant *v = drvdata->variant; int i; for (i = 0; i < v->i2s_ports; ++i) @@ -530,7 +530,7 @@ static bool lpass_cpu_regmap_writeable(struct device *dev, unsigned int reg) static bool lpass_cpu_regmap_readable(struct device *dev, unsigned int reg) { struct lpass_data *drvdata = dev_get_drvdata(dev); - struct lpass_variant *v = drvdata->variant; + const struct lpass_variant *v = drvdata->variant; int i; for (i = 0; i < v->i2s_ports; ++i) @@ -578,7 +578,7 @@ static bool lpass_cpu_regmap_readable(struct device *dev, unsigned int reg) static bool lpass_cpu_regmap_volatile(struct device *dev, unsigned int reg) { struct lpass_data *drvdata = dev_get_drvdata(dev); - struct lpass_variant *v = drvdata->variant; + const struct lpass_variant *v = drvdata->variant; int i; for (i = 0; i < v->irq_ports; ++i) { @@ -613,7 +613,7 @@ static struct regmap_config lpass_cpu_regmap_config = { static int lpass_hdmi_init_bitfields(struct device *dev, struct regmap *map) { struct lpass_data *drvdata = dev_get_drvdata(dev); - struct lpass_variant *v = drvdata->variant; + const struct lpass_variant *v = drvdata->variant; unsigned int i; struct lpass_hdmi_tx_ctl *tx_ctl; struct regmap_field *legacy_en; @@ -691,7 +691,7 @@ static int lpass_hdmi_init_bitfields(struct device *dev, struct regmap *map) static bool lpass_hdmi_regmap_writeable(struct device *dev, unsigned int reg) { struct lpass_data *drvdata = dev_get_drvdata(dev); - struct lpass_variant *v = drvdata->variant; + const struct lpass_variant *v = drvdata->variant; int i; if (reg == LPASS_HDMI_TX_CTL_ADDR(v)) @@ -736,7 +736,7 @@ static bool lpass_hdmi_regmap_writeable(struct device *dev, unsigned int reg) static bool lpass_hdmi_regmap_readable(struct device *dev, unsigned int reg) { struct lpass_data *drvdata = dev_get_drvdata(dev); - struct lpass_variant *v = drvdata->variant; + const struct lpass_variant *v = drvdata->variant; int i; if (reg == LPASS_HDMI_TX_CTL_ADDR(v)) @@ -785,7 +785,7 @@ static bool lpass_hdmi_regmap_readable(struct device *dev, unsigned int reg) static bool lpass_hdmi_regmap_volatile(struct device *dev, unsigned int reg) { struct lpass_data *drvdata = dev_get_drvdata(dev); - struct lpass_variant *v = drvdata->variant; + const struct lpass_variant *v = drvdata->variant; int i; if (reg == LPASS_HDMITX_APP_IRQSTAT_REG(v)) @@ -824,7 +824,7 @@ static struct regmap_config lpass_hdmi_regmap_config = { static bool __lpass_rxtx_regmap_accessible(struct device *dev, unsigned int reg, bool rw) { struct lpass_data *drvdata = dev_get_drvdata(dev); - struct lpass_variant *v = drvdata->variant; + const struct lpass_variant *v = drvdata->variant; int i; for (i = 0; i < v->rxtx_irq_ports; ++i) { @@ -890,7 +890,7 @@ static bool lpass_rxtx_regmap_readable(struct device *dev, unsigned int reg) static bool lpass_rxtx_regmap_volatile(struct device *dev, unsigned int reg) { struct lpass_data *drvdata = dev_get_drvdata(dev); - struct lpass_variant *v = drvdata->variant; + const struct lpass_variant *v = drvdata->variant; int i; for (i = 0; i < v->rxtx_irq_ports; ++i) { @@ -915,7 +915,7 @@ static bool lpass_rxtx_regmap_volatile(struct device *dev, unsigned int reg) static bool __lpass_va_regmap_accessible(struct device *dev, unsigned int reg, bool rw) { struct lpass_data *drvdata = dev_get_drvdata(dev); - struct lpass_variant *v = drvdata->variant; + const struct lpass_variant *v = drvdata->variant; int i; for (i = 0; i < v->va_irq_ports; ++i) { @@ -965,7 +965,7 @@ static bool lpass_va_regmap_readable(struct device *dev, unsigned int reg) static bool lpass_va_regmap_volatile(struct device *dev, unsigned int reg) { struct lpass_data *drvdata = dev_get_drvdata(dev); - struct lpass_variant *v = drvdata->variant; + const struct lpass_variant *v = drvdata->variant; int i; for (i = 0; i < v->va_irq_ports; ++i) { @@ -1104,7 +1104,7 @@ int asoc_qcom_lpass_cpu_platform_probe(struct platform_device *pdev) struct lpass_data *drvdata; struct device_node *dsp_of_node; struct resource *res; - struct lpass_variant *variant; + const struct lpass_variant *variant; struct device *dev = &pdev->dev; const struct of_device_id *match; int ret, i, dai_id; diff --git a/sound/soc/qcom/lpass-ipq806x.c b/sound/soc/qcom/lpass-ipq806x.c index 2c97f295e394..bbe9f11d7780 100644 --- a/sound/soc/qcom/lpass-ipq806x.c +++ b/sound/soc/qcom/lpass-ipq806x.c @@ -108,7 +108,7 @@ static int ipq806x_lpass_free_dma_channel(struct lpass_data *drvdata, int chan, return 0; } -static struct lpass_variant ipq806x_data = { +static const struct lpass_variant ipq806x_data = { .i2sctrl_reg_base = 0x0010, .i2sctrl_reg_stride = 0x04, .i2s_ports = 5, diff --git a/sound/soc/qcom/lpass-platform.c b/sound/soc/qcom/lpass-platform.c index 73e3d39bd24c..6569102486e2 100644 --- a/sound/soc/qcom/lpass-platform.c +++ b/sound/soc/qcom/lpass-platform.c @@ -100,7 +100,7 @@ static int lpass_platform_alloc_rxtx_dmactl_fields(struct device *dev, struct regmap *map) { struct lpass_data *drvdata = dev_get_drvdata(dev); - struct lpass_variant *v = drvdata->variant; + const struct lpass_variant *v = drvdata->variant; struct lpaif_dmactl *rd_dmactl, *wr_dmactl; int rval; @@ -128,7 +128,7 @@ static int lpass_platform_alloc_va_dmactl_fields(struct device *dev, struct regmap *map) { struct lpass_data *drvdata = dev_get_drvdata(dev); - struct lpass_variant *v = drvdata->variant; + const struct lpass_variant *v = drvdata->variant; struct lpaif_dmactl *wr_dmactl; wr_dmactl = devm_kzalloc(dev, sizeof(*wr_dmactl), GFP_KERNEL); @@ -145,7 +145,7 @@ static int lpass_platform_alloc_dmactl_fields(struct device *dev, struct regmap *map) { struct lpass_data *drvdata = dev_get_drvdata(dev); - struct lpass_variant *v = drvdata->variant; + const struct lpass_variant *v = drvdata->variant; struct lpaif_dmactl *rd_dmactl, *wr_dmactl; int rval; @@ -175,7 +175,7 @@ static int lpass_platform_alloc_hdmidmactl_fields(struct device *dev, struct regmap *map) { struct lpass_data *drvdata = dev_get_drvdata(dev); - struct lpass_variant *v = drvdata->variant; + const struct lpass_variant *v = drvdata->variant; struct lpaif_dmactl *rd_dmactl; rd_dmactl = devm_kzalloc(dev, sizeof(struct lpaif_dmactl), GFP_KERNEL); @@ -195,7 +195,7 @@ static int lpass_platform_pcmops_open(struct snd_soc_component *component, struct snd_soc_pcm_runtime *soc_runtime = snd_soc_substream_to_rtd(substream); struct snd_soc_dai *cpu_dai = snd_soc_rtd_to_cpu(soc_runtime, 0); struct lpass_data *drvdata = snd_soc_component_get_drvdata(component); - struct lpass_variant *v = drvdata->variant; + const struct lpass_variant *v = drvdata->variant; int ret, dma_ch, dir = substream->stream; struct lpass_pcm_data *data; struct regmap *map; @@ -287,7 +287,7 @@ static int lpass_platform_pcmops_close(struct snd_soc_component *component, struct snd_soc_pcm_runtime *soc_runtime = snd_soc_substream_to_rtd(substream); struct snd_soc_dai *cpu_dai = snd_soc_rtd_to_cpu(soc_runtime, 0); struct lpass_data *drvdata = snd_soc_component_get_drvdata(component); - struct lpass_variant *v = drvdata->variant; + const struct lpass_variant *v = drvdata->variant; struct lpass_pcm_data *data; unsigned int dai_id = cpu_dai->driver->id; @@ -358,7 +358,7 @@ static int __lpass_get_id(const struct snd_pcm_substream *substream, struct lpass_data *drvdata = snd_soc_component_get_drvdata(component); struct snd_pcm_runtime *rt = substream->runtime; struct lpass_pcm_data *pcm_data = rt->private_data; - struct lpass_variant *v = drvdata->variant; + const struct lpass_variant *v = drvdata->variant; int id; switch (cpu_dai->driver->id) { @@ -421,7 +421,7 @@ static int lpass_platform_pcmops_hw_params(struct snd_soc_component *component, struct lpass_data *drvdata = snd_soc_component_get_drvdata(component); struct snd_pcm_runtime *rt = substream->runtime; struct lpass_pcm_data *pcm_data = rt->private_data; - struct lpass_variant *v = drvdata->variant; + const struct lpass_variant *v = drvdata->variant; snd_pcm_format_t format = params_format(params); unsigned int channels = params_channels(params); unsigned int regval; @@ -574,7 +574,7 @@ static int lpass_platform_pcmops_hw_free(struct snd_soc_component *component, struct lpass_data *drvdata = snd_soc_component_get_drvdata(component); struct snd_pcm_runtime *rt = substream->runtime; struct lpass_pcm_data *pcm_data = rt->private_data; - struct lpass_variant *v = drvdata->variant; + const struct lpass_variant *v = drvdata->variant; unsigned int reg; int ret; struct regmap *map; @@ -602,7 +602,7 @@ static int lpass_platform_pcmops_prepare(struct snd_soc_component *component, struct lpass_data *drvdata = snd_soc_component_get_drvdata(component); struct snd_pcm_runtime *rt = substream->runtime; struct lpass_pcm_data *pcm_data = rt->private_data; - struct lpass_variant *v = drvdata->variant; + const struct lpass_variant *v = drvdata->variant; struct lpaif_dmactl *dmactl; struct regmap *map; int ret, id, ch, dir = substream->stream; @@ -665,7 +665,7 @@ static int lpass_platform_pcmops_trigger(struct snd_soc_component *component, struct lpass_data *drvdata = snd_soc_component_get_drvdata(component); struct snd_pcm_runtime *rt = substream->runtime; struct lpass_pcm_data *pcm_data = rt->private_data; - struct lpass_variant *v = drvdata->variant; + const struct lpass_variant *v = drvdata->variant; struct lpaif_dmactl *dmactl; struct regmap *map; int ret, ch, id; @@ -864,7 +864,7 @@ static snd_pcm_uframes_t lpass_platform_pcmops_pointer( struct lpass_data *drvdata = snd_soc_component_get_drvdata(component); struct snd_pcm_runtime *rt = substream->runtime; struct lpass_pcm_data *pcm_data = rt->private_data; - struct lpass_variant *v = drvdata->variant; + const struct lpass_variant *v = drvdata->variant; unsigned int base_addr, curr_addr; int ret, ch, dir = substream->stream; struct regmap *map; @@ -928,7 +928,7 @@ static irqreturn_t lpass_dma_interrupt_handler( { struct snd_soc_pcm_runtime *soc_runtime = snd_soc_substream_to_rtd(substream); struct snd_soc_dai *cpu_dai = snd_soc_rtd_to_cpu(soc_runtime, 0); - struct lpass_variant *v = drvdata->variant; + const struct lpass_variant *v = drvdata->variant; irqreturn_t ret = IRQ_NONE; int rv; unsigned int reg, val, mask; @@ -1020,7 +1020,7 @@ static irqreturn_t lpass_dma_interrupt_handler( static irqreturn_t lpass_platform_lpaif_irq(int irq, void *data) { struct lpass_data *drvdata = data; - struct lpass_variant *v = drvdata->variant; + const struct lpass_variant *v = drvdata->variant; unsigned int irqs; int rv, chan; @@ -1048,7 +1048,7 @@ static irqreturn_t lpass_platform_lpaif_irq(int irq, void *data) static irqreturn_t lpass_platform_hdmiif_irq(int irq, void *data) { struct lpass_data *drvdata = data; - struct lpass_variant *v = drvdata->variant; + const struct lpass_variant *v = drvdata->variant; unsigned int irqs; int rv, chan; @@ -1078,7 +1078,7 @@ static irqreturn_t lpass_platform_hdmiif_irq(int irq, void *data) static irqreturn_t lpass_platform_rxtxif_irq(int irq, void *data) { struct lpass_data *drvdata = data; - struct lpass_variant *v = drvdata->variant; + const struct lpass_variant *v = drvdata->variant; unsigned int irqs; irqreturn_t rv; int chan; @@ -1103,7 +1103,7 @@ static irqreturn_t lpass_platform_rxtxif_irq(int irq, void *data) static irqreturn_t lpass_platform_vaif_irq(int irq, void *data) { struct lpass_data *drvdata = data; - struct lpass_variant *v = drvdata->variant; + const struct lpass_variant *v = drvdata->variant; unsigned int irqs; irqreturn_t rv; int chan; @@ -1268,7 +1268,7 @@ static const struct snd_soc_component_driver lpass_component_driver = { int asoc_qcom_lpass_platform_register(struct platform_device *pdev) { struct lpass_data *drvdata = platform_get_drvdata(pdev); - struct lpass_variant *v = drvdata->variant; + const struct lpass_variant *v = drvdata->variant; int ret; drvdata->lpaif_irq = platform_get_irq_byname(pdev, "lpass-irq-lpaif"); diff --git a/sound/soc/qcom/lpass-sc7180.c b/sound/soc/qcom/lpass-sc7180.c index d16c0d83aaad..1b0c04b210ce 100644 --- a/sound/soc/qcom/lpass-sc7180.c +++ b/sound/soc/qcom/lpass-sc7180.c @@ -76,7 +76,7 @@ static struct snd_soc_dai_driver sc7180_lpass_cpu_dai_driver[] = { static int sc7180_lpass_alloc_dma_channel(struct lpass_data *drvdata, int direction, unsigned int dai_id) { - struct lpass_variant *v = drvdata->variant; + const struct lpass_variant *v = drvdata->variant; int chan = 0; if (dai_id == LPASS_DP_RX) { @@ -123,7 +123,7 @@ static int sc7180_lpass_free_dma_channel(struct lpass_data *drvdata, int chan, u static int sc7180_lpass_init(struct platform_device *pdev) { struct lpass_data *drvdata = platform_get_drvdata(pdev); - struct lpass_variant *variant = drvdata->variant; + const struct lpass_variant *variant = drvdata->variant; struct device *dev = &pdev->dev; int ret, i; @@ -179,7 +179,7 @@ static const struct dev_pm_ops sc7180_lpass_pm_ops = { SET_SYSTEM_SLEEP_PM_OPS(sc7180_lpass_dev_suspend, sc7180_lpass_dev_resume) }; -static struct lpass_variant sc7180_data = { +static const struct lpass_variant sc7180_data = { .i2sctrl_reg_base = 0x1000, .i2sctrl_reg_stride = 0x1000, .i2s_ports = 3, diff --git a/sound/soc/qcom/lpass-sc7280.c b/sound/soc/qcom/lpass-sc7280.c index 6b2eb25ed939..7cd3e291382a 100644 --- a/sound/soc/qcom/lpass-sc7280.c +++ b/sound/soc/qcom/lpass-sc7280.c @@ -110,7 +110,7 @@ static struct snd_soc_dai_driver sc7280_lpass_cpu_dai_driver[] = { static int sc7280_lpass_alloc_dma_channel(struct lpass_data *drvdata, int direction, unsigned int dai_id) { - struct lpass_variant *v = drvdata->variant; + const struct lpass_variant *v = drvdata->variant; int chan = 0; switch (dai_id) { @@ -196,7 +196,7 @@ static int sc7280_lpass_free_dma_channel(struct lpass_data *drvdata, int chan, u static int sc7280_lpass_init(struct platform_device *pdev) { struct lpass_data *drvdata = platform_get_drvdata(pdev); - struct lpass_variant *variant = drvdata->variant; + const struct lpass_variant *variant = drvdata->variant; struct device *dev = &pdev->dev; int ret, i; @@ -252,7 +252,7 @@ static const struct dev_pm_ops sc7280_lpass_pm_ops = { SET_SYSTEM_SLEEP_PM_OPS(sc7280_lpass_dev_suspend, sc7280_lpass_dev_resume) }; -static struct lpass_variant sc7280_data = { +static const struct lpass_variant sc7280_data = { .i2sctrl_reg_base = 0x1000, .i2sctrl_reg_stride = 0x1000, .i2s_ports = 3, diff --git a/sound/soc/qcom/lpass.h b/sound/soc/qcom/lpass.h index bdfe66ec3314..aab60540563a 100644 --- a/sound/soc/qcom/lpass.h +++ b/sound/soc/qcom/lpass.h @@ -139,7 +139,7 @@ struct lpass_data { int vaif_irq; /* SOC specific variations in the LPASS IP integration */ - struct lpass_variant *variant; + const struct lpass_variant *variant; /* bit map to keep track of static channel allocations */ unsigned long dma_ch_bit_map; From patchwork Fri Oct 6 20:09:14 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rob Herring X-Patchwork-Id: 149387 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:a888:0:b0:403:3b70:6f57 with SMTP id x8csp570079vqo; Fri, 6 Oct 2023 13:10:07 -0700 (PDT) X-Google-Smtp-Source: AGHT+IEAux72UTgarp6vHsf7/Dj7zYnnXElHW//FTn6BAswZSZFoMqJu9Nfn2ZH09t2M0eqvvUy2 X-Received: by 2002:a05:6358:98a8:b0:139:b4c0:94d with SMTP id q40-20020a05635898a800b00139b4c0094dmr10893883rwa.12.1696623007623; Fri, 06 Oct 2023 13:10:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1696623007; cv=none; d=google.com; s=arc-20160816; b=X1RqhGp4cP59ihYZ7A2N9EINZh9An0YIjRMmmF0/bmrKTADaWNx10s/1K1qO7FedO3 UnrZCM0LczF4BaGw3m7RTJd8ju2OX87U8DouOBkZTXpNLOiKMfVskqBOkiJMxN6S3kwD teu+TdbFwbbW9Lp2iaHlUC8ns0Yvc+FH7hL+txUseEc/nyJj37yk9xgxdt2iCjey65ao 7q2YSXMaxkoFv0yLhO4pe7V+/KAHNpPDTqII3B6c55gpoE2v91TywOXJb3tX9NpBsf1X 4fzJnK06om9B0sviprph+bzB6o1yUhx7pZc35JLni3N3iQULfhzpSICGtrLK1FGyB4TY kt8Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:in-reply-to:references:message-id :content-transfer-encoding:mime-version:subject:date:from; bh=JVsnx99XaF2BlRuypV2LU30baSB/YEHayThwv4pWeUs=; fh=IJ32rODLot8WzKyM5hJwYaHKfXI1FHqM5tEDV9+u21c=; b=UuAi/RNLv4m9P9sJpwXxi2MfSFpgFVO04o74JYN59HswPECt41N78ensgZoz59plMp u5e8HI+jjjFMz1MzIsJBZKUd1gd1L2XbXVrFy72mtNoxmVvqwb9q3riRqhSgQyy1zJsc kOIJJYJxUV3XtAV2sEgHOYQpAPKGSJWweLPKl9P8FYTdWDMfR4LIQwdaOcYT1rd1clGr cvzN/4lNcA6sMABplnv3FHPf4yqvMkB+rupPg7lUYhAd2XPWYKA7HHuwvpR1IiVBto9q 9KBqQyprV5C0tj19v8Qv3P6m2XhOlZhyYuNs07gOxC9IU3HFMCjb305ZpM7PQltjLTbU jrKw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from snail.vger.email (snail.vger.email. [2620:137:e000::3:7]) by mx.google.com with ESMTPS id o3-20020a655bc3000000b00584d3c4a775si4392371pgr.626.2023.10.06.13.10.07 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 06 Oct 2023 13:10:07 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) client-ip=2620:137:e000::3:7; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by snail.vger.email (Postfix) with ESMTP id 016EA837B2CD; Fri, 6 Oct 2023 13:10:07 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at snail.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233448AbjJFUJy (ORCPT + 18 others); Fri, 6 Oct 2023 16:09:54 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53888 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233428AbjJFUJt (ORCPT ); Fri, 6 Oct 2023 16:09:49 -0400 Received: from mail-oa1-f50.google.com (mail-oa1-f50.google.com [209.85.160.50]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DDD1F107 for ; Fri, 6 Oct 2023 13:09:45 -0700 (PDT) Received: by mail-oa1-f50.google.com with SMTP id 586e51a60fabf-1dcead29b3eso1565676fac.3 for ; Fri, 06 Oct 2023 13:09:45 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1696622982; x=1697227782; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=JVsnx99XaF2BlRuypV2LU30baSB/YEHayThwv4pWeUs=; b=f6NKebdhF7zS2D2S04HqnfiSfx+sNxrFVdf5LEMDmhuKohYawIIuPErI7a2RZ/OFXq 7Y38WiRnDpcCCqRs/T/HfeIBrYm5ZI6feHZuDd5Z2yxnPZRTN9RVIdpiIZKc0t3b6LAF ChOB+FDXoXAnm8n0gbubPQhVvUQZqOKKDx69kvXHeWIn1NTI2r0a75TSZoyHIoEuMPG8 tQKRa0uknZ6crEATJRUZ3GwaOKsmvw04Oe3l6S/aVTovr8tyh11clASUeTgmzi7jttZD Z9CoZ99ZOVsr2sgqnvPgg5/xD5FTc8QMd1t8+KsXLsG5J/zTiRj2xrCpNpsdG+w/jDSW 4NbQ== X-Gm-Message-State: AOJu0YzL2oc5cTUu4GHS0PaEFglrCWpYmpCfq9Yu5qhv4wUFGfjlDCCE vXlVpYBNOFicIqDbfHIfug== X-Received: by 2002:a05:6871:5cc:b0:1bb:6ee1:114e with SMTP id v12-20020a05687105cc00b001bb6ee1114emr10232512oan.28.1696622982349; Fri, 06 Oct 2023 13:09:42 -0700 (PDT) Received: from robh_at_kernel.org (66-90-144-107.dyn.grandenetworks.net. [66.90.144.107]) by smtp.gmail.com with ESMTPSA id g2-20020a056870a24200b001dcba6381dcsm879814oai.39.2023.10.06.13.09.39 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 06 Oct 2023 13:09:41 -0700 (PDT) Received: (nullmailer pid 229133 invoked by uid 1000); Fri, 06 Oct 2023 20:09:30 -0000 From: Rob Herring Date: Fri, 06 Oct 2023 15:09:14 -0500 Subject: [PATCH v3 5/5] ASoC: Use device_get_match_data() MIME-Version: 1.0 Message-Id: <20231006-dt-asoc-header-cleanups-v3-5-13a4f0f7fee6@kernel.org> References: <20231006-dt-asoc-header-cleanups-v3-0-13a4f0f7fee6@kernel.org> In-Reply-To: <20231006-dt-asoc-header-cleanups-v3-0-13a4f0f7fee6@kernel.org> To: Mark Brown , Claudiu Beznea , Jaroslav Kysela , Takashi Iwai , Peter Rosin , Lars-Peter Clausen , nuno.sa@analog.com, James Schulman , David Rhodes , Richard Fitzgerald , AngeloGioacchino Del Regno , Shenghao Ding , Kevin Lu , Baojun Xu , Oder Chiou , Fabio Estevam , Kiseok Jo , Kevin Cernekee , Shengjiu Wang , Xiubo Li , Nicolin Chen , Srinivas Kandagatla , Banajit Goswami , Nicolas Frattaroli , Sylwester Nawrocki , Ban Tao , Peter Ujfalusi , Jarkko Nikula , Cezary Rojewski , Pierre-Louis Bossart , Peter Ujfalusi , Bard Liao , Ranjani Sridharan , Kai Vehmanen , Olivier Moysan , Arnaud Pouliquen , Maxime Coquelin , Alexandre Torgue Cc: alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org, linuxppc-dev@lists.ozlabs.org X-Mailer: b4 0.13-dev X-Spam-Status: No, score=-1.1 required=5.0 tests=BAYES_00, FREEMAIL_ENVFROM_END_DIGIT,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,RCVD_IN_DNSWL_BLOCKED,RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (snail.vger.email [0.0.0.0]); Fri, 06 Oct 2023 13:10:07 -0700 (PDT) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1779038166474642213 X-GMAIL-MSGID: 1779038166474642213 Use preferred device_get_match_data() instead of of_match_device() to get the driver match data. With this, adjust the includes to explicitly include the correct headers. Signed-off-by: Rob Herring --- v3: - Move some header changes from patch 1 to here for rockchip_i2s_tdm.c, rockchip_pdm.c, smdk_wm8994.c, and tegra210_amx.c. --- sound/soc/intel/keembay/kmb_platform.c | 13 +------------ sound/soc/qcom/lpass-cpu.c | 15 +++++---------- sound/soc/rockchip/rockchip_i2s.c | 8 +++----- sound/soc/rockchip/rockchip_i2s_tdm.c | 24 ++++++++---------------- sound/soc/rockchip/rockchip_pdm.c | 7 +------ sound/soc/samsung/smdk_wm8994.c | 28 +++------------------------- sound/soc/stm/stm32_i2s.c | 7 ++----- sound/soc/stm/stm32_sai.c | 8 ++++---- sound/soc/stm/stm32_sai_sub.c | 6 +----- sound/soc/stm/stm32_spdifrx.c | 8 ++------ sound/soc/tegra/tegra210_amx.c | 10 ++-------- sound/soc/ti/davinci-evm.c | 7 ++----- sound/soc/ti/davinci-mcasp.c | 9 ++++----- sound/soc/ti/omap-mcbsp.c | 10 ++++------ 14 files changed, 42 insertions(+), 118 deletions(-) diff --git a/sound/soc/intel/keembay/kmb_platform.c b/sound/soc/intel/keembay/kmb_platform.c index e929497a5eb5..37ea2e1d2e92 100644 --- a/sound/soc/intel/keembay/kmb_platform.c +++ b/sound/soc/intel/keembay/kmb_platform.c @@ -11,7 +11,6 @@ #include #include #include -#include #include #include #include @@ -820,7 +819,6 @@ static int kmb_plat_dai_probe(struct platform_device *pdev) { struct device_node *np = pdev->dev.of_node; struct snd_soc_dai_driver *kmb_i2s_dai; - const struct of_device_id *match; struct device *dev = &pdev->dev; struct kmb_i2s_info *kmb_i2s; struct resource *res; @@ -831,16 +829,7 @@ static int kmb_plat_dai_probe(struct platform_device *pdev) if (!kmb_i2s) return -ENOMEM; - kmb_i2s_dai = devm_kzalloc(dev, sizeof(*kmb_i2s_dai), GFP_KERNEL); - if (!kmb_i2s_dai) - return -ENOMEM; - - match = of_match_device(kmb_plat_of_match, &pdev->dev); - if (!match) { - dev_err(&pdev->dev, "Error: No device match found\n"); - return -ENODEV; - } - kmb_i2s_dai = (struct snd_soc_dai_driver *) match->data; + kmb_i2s_dai = (struct snd_soc_dai_driver *)device_get_match_data(&pdev->dev); /* Prepare the related clocks */ kmb_i2s->clk_apb = devm_clk_get(dev, "apb_clk"); diff --git a/sound/soc/qcom/lpass-cpu.c b/sound/soc/qcom/lpass-cpu.c index 18aff2654f89..ac0feb89b458 100644 --- a/sound/soc/qcom/lpass-cpu.c +++ b/sound/soc/qcom/lpass-cpu.c @@ -9,7 +9,6 @@ #include #include #include -#include #include #include #include @@ -1106,7 +1105,6 @@ int asoc_qcom_lpass_cpu_platform_probe(struct platform_device *pdev) struct resource *res; const struct lpass_variant *variant; struct device *dev = &pdev->dev; - const struct of_device_id *match; int ret, i, dai_id; dsp_of_node = of_parse_phandle(pdev->dev.of_node, "qcom,adsp", 0); @@ -1121,17 +1119,14 @@ int asoc_qcom_lpass_cpu_platform_probe(struct platform_device *pdev) return -ENOMEM; platform_set_drvdata(pdev, drvdata); - match = of_match_device(dev->driver->of_match_table, dev); - if (!match || !match->data) + variant = device_get_match_data(dev); + if (!variant) return -EINVAL; - if (of_device_is_compatible(dev->of_node, "qcom,lpass-cpu-apq8016")) { - dev_warn(dev, "%s compatible is deprecated\n", - match->compatible); - } + if (of_device_is_compatible(dev->of_node, "qcom,lpass-cpu-apq8016")) + dev_warn(dev, "qcom,lpass-cpu-apq8016 compatible is deprecated\n"); - drvdata->variant = (struct lpass_variant *)match->data; - variant = drvdata->variant; + drvdata->variant = variant; of_lpass_cpu_parse_dai_data(dev, drvdata); diff --git a/sound/soc/rockchip/rockchip_i2s.c b/sound/soc/rockchip/rockchip_i2s.c index 74e7d6ee0f28..b0c3ef030e06 100644 --- a/sound/soc/rockchip/rockchip_i2s.c +++ b/sound/soc/rockchip/rockchip_i2s.c @@ -10,8 +10,8 @@ #include #include #include +#include #include -#include #include #include #include @@ -736,7 +736,6 @@ static int rockchip_i2s_init_dai(struct rk_i2s_dev *i2s, struct resource *res, static int rockchip_i2s_probe(struct platform_device *pdev) { struct device_node *node = pdev->dev.of_node; - const struct of_device_id *of_id; struct rk_i2s_dev *i2s; struct snd_soc_dai_driver *dai; struct resource *res; @@ -752,11 +751,10 @@ static int rockchip_i2s_probe(struct platform_device *pdev) i2s->grf = syscon_regmap_lookup_by_phandle(node, "rockchip,grf"); if (!IS_ERR(i2s->grf)) { - of_id = of_match_device(rockchip_i2s_match, &pdev->dev); - if (!of_id || !of_id->data) + i2s->pins = device_get_match_data(&pdev->dev); + if (!i2s->pins) return -EINVAL; - i2s->pins = of_id->data; } /* try to prepare related clocks */ diff --git a/sound/soc/rockchip/rockchip_i2s_tdm.c b/sound/soc/rockchip/rockchip_i2s_tdm.c index d3700f3c98e6..7e996550d1df 100644 --- a/sound/soc/rockchip/rockchip_i2s_tdm.c +++ b/sound/soc/rockchip/rockchip_i2s_tdm.c @@ -10,9 +10,7 @@ #include #include #include -#include -#include -#include +#include #include #include #include @@ -75,7 +73,7 @@ struct rk_i2s_tdm_dev { struct snd_dmaengine_dai_dma_data playback_dma_data; struct reset_control *tx_reset; struct reset_control *rx_reset; - struct rk_i2s_soc_data *soc_data; + const struct rk_i2s_soc_data *soc_data; bool is_master_mode; bool io_multiplex; bool mclk_calibrate; @@ -1277,21 +1275,21 @@ static const struct txrx_config rv1126_txrx_config[] = { { 0xff800000, 0x10260, RV1126_I2S0_CLK_TXONLY, RV1126_I2S0_CLK_RXONLY }, }; -static struct rk_i2s_soc_data px30_i2s_soc_data = { +static const struct rk_i2s_soc_data px30_i2s_soc_data = { .softrst_offset = 0x0300, .configs = px30_txrx_config, .config_count = ARRAY_SIZE(px30_txrx_config), .init = common_soc_init, }; -static struct rk_i2s_soc_data rk1808_i2s_soc_data = { +static const struct rk_i2s_soc_data rk1808_i2s_soc_data = { .softrst_offset = 0x0300, .configs = rk1808_txrx_config, .config_count = ARRAY_SIZE(rk1808_txrx_config), .init = common_soc_init, }; -static struct rk_i2s_soc_data rk3308_i2s_soc_data = { +static const struct rk_i2s_soc_data rk3308_i2s_soc_data = { .softrst_offset = 0x0400, .grf_reg_offset = 0x0308, .grf_shift = 5, @@ -1300,14 +1298,14 @@ static struct rk_i2s_soc_data rk3308_i2s_soc_data = { .init = common_soc_init, }; -static struct rk_i2s_soc_data rk3568_i2s_soc_data = { +static const struct rk_i2s_soc_data rk3568_i2s_soc_data = { .softrst_offset = 0x0400, .configs = rk3568_txrx_config, .config_count = ARRAY_SIZE(rk3568_txrx_config), .init = common_soc_init, }; -static struct rk_i2s_soc_data rv1126_i2s_soc_data = { +static const struct rk_i2s_soc_data rv1126_i2s_soc_data = { .softrst_offset = 0x0300, .configs = rv1126_txrx_config, .config_count = ARRAY_SIZE(rv1126_txrx_config), @@ -1544,7 +1542,6 @@ static int rockchip_i2s_tdm_rx_path_prepare(struct rk_i2s_tdm_dev *i2s_tdm, static int rockchip_i2s_tdm_probe(struct platform_device *pdev) { struct device_node *node = pdev->dev.of_node; - const struct of_device_id *of_id; struct rk_i2s_tdm_dev *i2s_tdm; struct resource *res; void __iomem *regs; @@ -1556,13 +1553,8 @@ static int rockchip_i2s_tdm_probe(struct platform_device *pdev) i2s_tdm->dev = &pdev->dev; - of_id = of_match_device(rockchip_i2s_tdm_match, &pdev->dev); - if (!of_id) - return -EINVAL; - spin_lock_init(&i2s_tdm->lock); - i2s_tdm->soc_data = (struct rk_i2s_soc_data *)of_id->data; - + i2s_tdm->soc_data = device_get_match_data(&pdev->dev); i2s_tdm->frame_width = 64; i2s_tdm->clk_trcm = TRCM_TXRX; diff --git a/sound/soc/rockchip/rockchip_pdm.c b/sound/soc/rockchip/rockchip_pdm.c index 4756cfc23218..d16a4a67a6a2 100644 --- a/sound/soc/rockchip/rockchip_pdm.c +++ b/sound/soc/rockchip/rockchip_pdm.c @@ -8,7 +8,6 @@ #include #include #include -#include #include #include #include @@ -572,7 +571,6 @@ static int rockchip_pdm_path_parse(struct rk_pdm_dev *pdm, struct device_node *n static int rockchip_pdm_probe(struct platform_device *pdev) { struct device_node *node = pdev->dev.of_node; - const struct of_device_id *match; struct rk_pdm_dev *pdm; struct resource *res; void __iomem *regs; @@ -582,10 +580,7 @@ static int rockchip_pdm_probe(struct platform_device *pdev) if (!pdm) return -ENOMEM; - match = of_match_device(rockchip_pdm_match, &pdev->dev); - if (match) - pdm->version = (uintptr_t)match->data; - + pdm->version = (enum rk_pdm_version)device_get_match_data(&pdev->dev); if (pdm->version == RK_PDM_RK3308) { pdm->reset = devm_reset_control_get(&pdev->dev, "pdm-m"); if (IS_ERR(pdm->reset)) diff --git a/sound/soc/samsung/smdk_wm8994.c b/sound/soc/samsung/smdk_wm8994.c index 13fb1bd7f4c9..def92cc09f9c 100644 --- a/sound/soc/samsung/smdk_wm8994.c +++ b/sound/soc/samsung/smdk_wm8994.c @@ -5,7 +5,6 @@ #include #include #include -#include /* * Default CFG switch settings to use this driver: @@ -32,15 +31,6 @@ /* SMDK has a 16.934MHZ crystal attached to WM8994 */ #define SMDK_WM8994_FREQ 16934000 -struct smdk_wm8994_data { - int mclk1_rate; -}; - -/* Default SMDKs */ -static struct smdk_wm8994_data smdk_board_data = { - .mclk1_rate = SMDK_WM8994_FREQ, -}; - static int smdk_hw_params(struct snd_pcm_substream *substream, struct snd_pcm_hw_params *params) { @@ -136,8 +126,8 @@ static struct snd_soc_card smdk = { .num_links = ARRAY_SIZE(smdk_dai), }; -static const struct of_device_id samsung_wm8994_of_match[] __maybe_unused = { - { .compatible = "samsung,smdk-wm8994", .data = &smdk_board_data }, +static const struct of_device_id samsung_wm8994_of_match[] = { + { .compatible = "samsung,smdk-wm8994" }, {}, }; MODULE_DEVICE_TABLE(of, samsung_wm8994_of_match); @@ -147,15 +137,9 @@ static int smdk_audio_probe(struct platform_device *pdev) int ret; struct device_node *np = pdev->dev.of_node; struct snd_soc_card *card = &smdk; - struct smdk_wm8994_data *board; - const struct of_device_id *id; card->dev = &pdev->dev; - board = devm_kzalloc(&pdev->dev, sizeof(*board), GFP_KERNEL); - if (!board) - return -ENOMEM; - if (np) { smdk_dai[0].cpus->dai_name = NULL; smdk_dai[0].cpus->of_node = of_parse_phandle(np, @@ -171,12 +155,6 @@ static int smdk_audio_probe(struct platform_device *pdev) smdk_dai[0].platforms->of_node = smdk_dai[0].cpus->of_node; } - id = of_match_device(samsung_wm8994_of_match, &pdev->dev); - if (id) - *board = *((struct smdk_wm8994_data *)id->data); - - platform_set_drvdata(pdev, board); - ret = devm_snd_soc_register_card(&pdev->dev, card); if (ret) @@ -188,7 +166,7 @@ static int smdk_audio_probe(struct platform_device *pdev) static struct platform_driver smdk_audio_driver = { .driver = { .name = "smdk-audio-wm8994", - .of_match_table = of_match_ptr(samsung_wm8994_of_match), + .of_match_table = samsung_wm8994_of_match, .pm = &snd_soc_pm_ops, }, .probe = smdk_audio_probe, diff --git a/sound/soc/stm/stm32_i2s.c b/sound/soc/stm/stm32_i2s.c index 06a42130f5e4..46098e111142 100644 --- a/sound/soc/stm/stm32_i2s.c +++ b/sound/soc/stm/stm32_i2s.c @@ -1024,7 +1024,6 @@ static int stm32_i2s_parse_dt(struct platform_device *pdev, struct stm32_i2s_data *i2s) { struct device_node *np = pdev->dev.of_node; - const struct of_device_id *of_id; struct reset_control *rst; struct resource *res; int irq, ret; @@ -1032,10 +1031,8 @@ static int stm32_i2s_parse_dt(struct platform_device *pdev, if (!np) return -ENODEV; - of_id = of_match_device(stm32_i2s_ids, &pdev->dev); - if (of_id) - i2s->regmap_conf = (const struct regmap_config *)of_id->data; - else + i2s->regmap_conf = device_get_match_data(&pdev->dev); + if (!i2s->regmap_conf) return -EINVAL; i2s->base = devm_platform_get_and_ioremap_resource(pdev, 0, &res); diff --git a/sound/soc/stm/stm32_sai.c b/sound/soc/stm/stm32_sai.c index 8e21e6f886fc..b45ee7e24f22 100644 --- a/sound/soc/stm/stm32_sai.c +++ b/sound/soc/stm/stm32_sai.c @@ -151,8 +151,8 @@ static int stm32_sai_set_sync(struct stm32_sai_data *sai_client, static int stm32_sai_probe(struct platform_device *pdev) { struct stm32_sai_data *sai; + const struct stm32_sai_conf *conf; struct reset_control *rst; - const struct of_device_id *of_id; u32 val; int ret; @@ -164,9 +164,9 @@ static int stm32_sai_probe(struct platform_device *pdev) if (IS_ERR(sai->base)) return PTR_ERR(sai->base); - of_id = of_match_device(stm32_sai_ids, &pdev->dev); - if (of_id) - memcpy(&sai->conf, (const struct stm32_sai_conf *)of_id->data, + conf = device_get_match_data(&pdev->dev); + if (conf) + memcpy(&sai->conf, (const struct stm32_sai_conf *)conf, sizeof(struct stm32_sai_conf)); else return -EINVAL; diff --git a/sound/soc/stm/stm32_sai_sub.c b/sound/soc/stm/stm32_sai_sub.c index 8bcb98d9b64e..ad2492efb1cd 100644 --- a/sound/soc/stm/stm32_sai_sub.c +++ b/sound/soc/stm/stm32_sai_sub.c @@ -1506,7 +1506,6 @@ static int stm32_sai_sub_parse_of(struct platform_device *pdev, static int stm32_sai_sub_probe(struct platform_device *pdev) { struct stm32_sai_sub_data *sai; - const struct of_device_id *of_id; const struct snd_dmaengine_pcm_config *conf = &stm32_sai_pcm_config; int ret; @@ -1514,10 +1513,7 @@ static int stm32_sai_sub_probe(struct platform_device *pdev) if (!sai) return -ENOMEM; - of_id = of_match_device(stm32_sai_sub_ids, &pdev->dev); - if (!of_id) - return -EINVAL; - sai->id = (uintptr_t)of_id->data; + sai->id = (uintptr_t)device_get_match_data(&pdev->dev); sai->pdev = pdev; mutex_init(&sai->ctrl_lock); diff --git a/sound/soc/stm/stm32_spdifrx.c b/sound/soc/stm/stm32_spdifrx.c index a359b528b26b..9eed3c57e3f1 100644 --- a/sound/soc/stm/stm32_spdifrx.c +++ b/sound/soc/stm/stm32_spdifrx.c @@ -908,17 +908,13 @@ static int stm32_spdifrx_parse_of(struct platform_device *pdev, struct stm32_spdifrx_data *spdifrx) { struct device_node *np = pdev->dev.of_node; - const struct of_device_id *of_id; struct resource *res; if (!np) return -ENODEV; - of_id = of_match_device(stm32_spdifrx_ids, &pdev->dev); - if (of_id) - spdifrx->regmap_conf = - (const struct regmap_config *)of_id->data; - else + spdifrx->regmap_conf = device_get_match_data(&pdev->dev); + if (!spdifrx->regmap_conf) return -EINVAL; spdifrx->base = devm_platform_get_and_ioremap_resource(pdev, 0, &res); diff --git a/sound/soc/tegra/tegra210_amx.c b/sound/soc/tegra/tegra210_amx.c index 179876949b30..dd1a2c77c6ea 100644 --- a/sound/soc/tegra/tegra210_amx.c +++ b/sound/soc/tegra/tegra210_amx.c @@ -7,9 +7,8 @@ #include #include #include +#include #include -#include -#include #include #include #include @@ -536,18 +535,13 @@ static int tegra210_amx_platform_probe(struct platform_device *pdev) struct tegra210_amx *amx; void __iomem *regs; int err; - const struct of_device_id *match; struct tegra210_amx_soc_data *soc_data; - match = of_match_device(tegra210_amx_of_match, dev); - - soc_data = (struct tegra210_amx_soc_data *)match->data; - amx = devm_kzalloc(dev, sizeof(*amx), GFP_KERNEL); if (!amx) return -ENOMEM; - amx->soc_data = soc_data; + amx->soc_data = device_get_match_data(dev); dev_set_drvdata(dev, amx); diff --git a/sound/soc/ti/davinci-evm.c b/sound/soc/ti/davinci-evm.c index ae7fdd761a7a..1bf333d2740d 100644 --- a/sound/soc/ti/davinci-evm.c +++ b/sound/soc/ti/davinci-evm.c @@ -175,20 +175,17 @@ static struct snd_soc_card evm_soc_card = { static int davinci_evm_probe(struct platform_device *pdev) { struct device_node *np = pdev->dev.of_node; - const struct of_device_id *match; struct snd_soc_dai_link *dai; struct snd_soc_card_drvdata_davinci *drvdata = NULL; struct clk *mclk; int ret = 0; - match = of_match_device(of_match_ptr(davinci_evm_dt_ids), &pdev->dev); - if (!match) { + dai = (struct snd_soc_dai_link *) device_get_match_data(&pdev->dev); + if (!dai) { dev_err(&pdev->dev, "Error: No device match found\n"); return -ENODEV; } - dai = (struct snd_soc_dai_link *) match->data; - evm_soc_card.dai_link = dai; dai->codecs->of_node = of_parse_phandle(np, "ti,audio-codec", 0); diff --git a/sound/soc/ti/davinci-mcasp.c b/sound/soc/ti/davinci-mcasp.c index 7e7d665a5504..b892d66f7847 100644 --- a/sound/soc/ti/davinci-mcasp.c +++ b/sound/soc/ti/davinci-mcasp.c @@ -21,8 +21,6 @@ #include #include #include -#include -#include #include #include #include @@ -1882,9 +1880,10 @@ static bool davinci_mcasp_have_gpiochip(struct davinci_mcasp *mcasp) static int davinci_mcasp_get_config(struct davinci_mcasp *mcasp, struct platform_device *pdev) { - const struct of_device_id *match = of_match_device(mcasp_dt_ids, &pdev->dev); struct device_node *np = pdev->dev.of_node; struct davinci_mcasp_pdata *pdata = NULL; + const struct davinci_mcasp_pdata *match_pdata = + device_get_match_data(&pdev->dev); const u32 *of_serial_dir32; u32 val; int i; @@ -1893,8 +1892,8 @@ static int davinci_mcasp_get_config(struct davinci_mcasp *mcasp, pdata = pdev->dev.platform_data; pdata->dismod = DISMOD_LOW; goto out; - } else if (match) { - pdata = devm_kmemdup(&pdev->dev, match->data, sizeof(*pdata), + } else if (match_pdata) { + pdata = devm_kmemdup(&pdev->dev, match_pdata, sizeof(*pdata), GFP_KERNEL); if (!pdata) return -ENOMEM; diff --git a/sound/soc/ti/omap-mcbsp.c b/sound/soc/ti/omap-mcbsp.c index bfe51221f541..7643a54592f5 100644 --- a/sound/soc/ti/omap-mcbsp.c +++ b/sound/soc/ti/omap-mcbsp.c @@ -13,7 +13,6 @@ #include #include #include -#include #include #include #include @@ -1360,23 +1359,22 @@ MODULE_DEVICE_TABLE(of, omap_mcbsp_of_match); static int asoc_mcbsp_probe(struct platform_device *pdev) { struct omap_mcbsp_platform_data *pdata = dev_get_platdata(&pdev->dev); + const struct omap_mcbsp_platform_data *match_pdata = + device_get_match_data(&pdev->dev); struct omap_mcbsp *mcbsp; - const struct of_device_id *match; int ret; - match = of_match_device(omap_mcbsp_of_match, &pdev->dev); - if (match) { + if (match_pdata) { struct device_node *node = pdev->dev.of_node; struct omap_mcbsp_platform_data *pdata_quirk = pdata; int buffer_size; - pdata = devm_kzalloc(&pdev->dev, + pdata = devm_kmemdup(&pdev->dev, match_pdata, sizeof(struct omap_mcbsp_platform_data), GFP_KERNEL); if (!pdata) return -ENOMEM; - memcpy(pdata, match->data, sizeof(*pdata)); if (!of_property_read_u32(node, "ti,buffer-size", &buffer_size)) pdata->buffer_size = buffer_size; if (pdata_quirk)