From patchwork Mon Aug 16 21:14:51 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Aakash Hemadri X-Patchwork-Id: 497680 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-13.8 required=3.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, DKIM_VALID, FREEMAIL_FORGED_FROMDOMAIN, FREEMAIL_FROM,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH, MAILING_LIST_MULTI, SPF_HELO_NONE, SPF_PASS, USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 11F52C4338F for ; Mon, 16 Aug 2021 21:16:12 +0000 (UTC) Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id B83FE61042 for ; Mon, 16 Aug 2021 21:16:10 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org B83FE61042 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=alsa-project.org Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id 7548B828; Mon, 16 Aug 2021 23:15:18 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 7548B828 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1629148568; bh=LAlltrblAQLhRTKM8BleVl9I1O7pF9GkMhWkBkaUVkQ=; h=From:To:Subject:Date:In-Reply-To:References:Cc:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=A+SrYOTsHpPpGOOK0wC7DV81FwokJRR5YZ3jE59mPQMSWFs9OpqZ0b5M/HMf0b/39 RnYIcDGlz28xTk7v7LvT3eGw5A4iPsp0wXKdK4gRcpnyIngoCDb734jfvKwJzlnyWn r+Y8wr2XxoHAfnajxMY603t21goWicQw39KvYWtI= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id E8168F80246; Mon, 16 Aug 2021 23:15:17 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id CBC7AF80259; Mon, 16 Aug 2021 23:15:15 +0200 (CEST) Received: from mail-pj1-x102a.google.com (mail-pj1-x102a.google.com [IPv6:2607:f8b0:4864:20::102a]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id 2E8B7F800AF for ; Mon, 16 Aug 2021 23:15:09 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 2E8B7F800AF Authentication-Results: alsa1.perex.cz; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="QbhLCH3S" Received: by mail-pj1-x102a.google.com with SMTP id w13-20020a17090aea0db029017897a5f7bcso2376363pjy.5 for ; Mon, 16 Aug 2021 14:15:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=Ti5ieSHy8bgHsKT/p42fBihkAPuECC+Byn0rag7Ilqg=; b=QbhLCH3SR6H9ufXcqkC6oI4jMlMlgavieMvQovzBxvt35SoUs0p9AyJBI57DfhwNQV 7qqPZ2WQtvg5jJpTprurs1f10RSBwq81MkFYnAKAqQLQleN0qHoeqmKStPUp+7ChDXNj 5bqoHWxMOS7nLsrssLZPgtUFlmo4kfXoPxLCepuj2FpdUoBMs88InvmK4bMbXKtOa57Q yJ5z50M1+WTsidQku2NEYeLed8/OzclW21ekSoCtjIVLBe+OQiSwNpnhf0e+evumT9d8 W9J1ArxmXszhvXIva2i1U7iGzIz85x2zUqY0bkuqo06tY9KGVkiLJOUQxtMH7cmy1jxe hf7Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=Ti5ieSHy8bgHsKT/p42fBihkAPuECC+Byn0rag7Ilqg=; b=WkZN3cKq7ieet1lK5FME5UFPpOvIYs951gt1ZYePB2kuEqs1K/gxbojFDzUvpdEXPt j/1V9Pis9tigZd9+gtWViRBYBHQz4q2fvJMcoxlwM+FJ6DMFMJyuLwIxH6hxR/v/Ibfb 6WB6dGu6UaG+YJPq2aiVcXy+CP/AbUYRc4kLQehR7emukQDu0bwnp4g1pHMEbi43wL6v BiKgm6QZByyCzlo+bDwlOaQZY04tgsIPjNWdyOkmFhtpGZRa/oTRCa1vom6h88BTrxVt BYBU+RIJJHosERvKG49yzLN4ltNyaZ7mZtvLZR41pF+qKDrAnW+OQWObXpTiTPdY+uw+ XQOA== X-Gm-Message-State: AOAM532NvQAy2QM+TyPYhwAMMnOxhqnLfMv1K+p0otmRkyx6PYKnD4hs r3zSG7uGMozoiSuGA3JPFm8= X-Google-Smtp-Source: ABdhPJwJZoEwj9uB4CQ5pwLcFobvwe7gSikogI6OOkXKzyMURtFG6MN6/a7qLfHoIesuQsL1YdH47w== X-Received: by 2002:a17:90a:ba16:: with SMTP id s22mr639486pjr.28.1629148507053; Mon, 16 Aug 2021 14:15:07 -0700 (PDT) Received: from xps.yggdrasil ([49.207.137.16]) by smtp.gmail.com with ESMTPSA id b12sm103154pff.63.2021.08.16.14.15.01 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 16 Aug 2021 14:15:06 -0700 (PDT) From: Aakash Hemadri To: Mark Brown , Liam Girdwood Subject: [PATCH 1/2] ASoC: tegra30: ahub: Fix incorrect usage of of_device_get_match_data Date: Tue, 17 Aug 2021 02:44:51 +0530 Message-Id: X-Mailer: git-send-email 2.32.0 In-Reply-To: References: MIME-Version: 1.0 Cc: alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org, Takashi Iwai , Jonathan Hunter , Bjorn Helgaas , Thierry Reding , Philipp Zabel , Shuah Khan , linux-tegra@vger.kernel.org X-BeenThere: alsa-devel@alsa-project.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: alsa-devel-bounces@alsa-project.org Sender: "Alsa-devel" const struct of_device_id incorrectly assigned "match->data" using of_device_get_match_data() Instead assign `const struct tegra30_ahub_soc_data *soc_data` with const void *of_device_get_match_data(...) Fixes: 80165bb80433 ("ASoC: tegra30: ahub: Use of_device_get_match_data") Signed-off-by: Aakash Hemadri --- sound/soc/tegra/tegra30_ahub.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/sound/soc/tegra/tegra30_ahub.c b/sound/soc/tegra/tegra30_ahub.c index 0ac109b32329..ef011a488ceb 100644 --- a/sound/soc/tegra/tegra30_ahub.c +++ b/sound/soc/tegra/tegra30_ahub.c @@ -512,16 +512,14 @@ static const struct of_device_id tegra30_ahub_of_match[] = { static int tegra30_ahub_probe(struct platform_device *pdev) { - const struct of_device_id *match; const struct tegra30_ahub_soc_data *soc_data; struct resource *res0; void __iomem *regs_apbif, *regs_ahub; int ret = 0; - match = of_device_get_match_data(&pdev->dev); - if (!match) + soc_data = of_device_get_match_data(&pdev->dev); + if (!soc_data) return -EINVAL; - soc_data = match->data; ahub = devm_kzalloc(&pdev->dev, sizeof(struct tegra30_ahub), GFP_KERNEL);