From patchwork Tue Aug 7 17:19:40 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Matthias Kaehlcke X-Patchwork-Id: 10559047 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id F0CA213BB for ; Tue, 7 Aug 2018 17:59:33 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id E496E2A6DC for ; Tue, 7 Aug 2018 17:59:33 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id D89DE2A6EA; Tue, 7 Aug 2018 17:59:33 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, MAILING_LIST_MULTI,RCVD_IN_DNSWL_NONE,T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id ACC192A6E3 for ; Tue, 7 Aug 2018 17:59:29 +0000 (UTC) Received: from alsa0.perex.cz (localhost [127.0.0.1]) by alsa0.perex.cz (Postfix) with ESMTP id 9ABE72678AF; Tue, 7 Aug 2018 19:19:58 +0200 (CEST) X-Original-To: alsa-devel@alsa-project.org Delivered-To: alsa-devel@alsa-project.org Received: by alsa0.perex.cz (Postfix, from userid 1000) id 87AA92678AF; Tue, 7 Aug 2018 19:19:56 +0200 (CEST) Received: from mail-pf1-f193.google.com (mail-pf1-f193.google.com [209.85.210.193]) by alsa0.perex.cz (Postfix) with ESMTP id 8A7DA267692 for ; Tue, 7 Aug 2018 19:19:51 +0200 (CEST) Received: by mail-pf1-f193.google.com with SMTP id u24-v6so8884474pfn.13 for ; Tue, 07 Aug 2018 10:19:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=a59LxUcKC10cZBrNB2xPj0F/GHLzuHlp566+Njh0szk=; b=EV47RCaweQuxINNb7MRhJ5pa7YNcaWIFE29gwVR3bMozB1OQBn2EAulpg1zllDXmn/ 8vDLfby1ckSO8z69IM/GBn0NxpBlimmIgFHnJ7nfJOLknsaxh9gghWSwew/APKDKonA4 IuFSx4RXBke/T6oNEMlMk8nncr9weyTyxKT5E= 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:mime-version :content-transfer-encoding; bh=a59LxUcKC10cZBrNB2xPj0F/GHLzuHlp566+Njh0szk=; b=eVIleRqarIdItomqbCW+WEn9jdTZRe6bZTa7z76xypyOMVCNBPOum9d66pdqDMkltW mMF+mKaCpwQ/3eyJAGZgDV0Ur2yjAWLFsNVpDWQ5kbCIgmAt9pJ2O12+qGNY8bDQUZtV bV0IMcTDqS/xU7q1JdfASfSw+odzTtrPI1F7jMkIwzHQ1QevaEd+IwtrE3viE4X48NIJ s5ssQgQF3DEm0lYtmYcdlsZdtfrj9gJgVN2TsHpdCvLOU97G9ti/ug+yrpqxxZ5tVlqm W6xbmr8aiBLP3mlbYzC82xK5VpnFjuwac40J7z9w4dSqWgzYoqVkNr0XiLldjJTro3cX edjQ== X-Gm-Message-State: AOUpUlHyiBMkim6xRjmLoVfaqw6BpQp8c2RpEVZwJ755rSq4btvwq6hP mLS1CQc6J/upGs3EQN7QFk9gGQ== X-Google-Smtp-Source: AAOMgpceAFxUt1iwwZYl65waOMrEROVWXSDwExVEp2XG0f1pVxf2hBfb+LFbU6U3CNtUymOTbuBWLQ== X-Received: by 2002:a63:d10c:: with SMTP id k12-v6mr19853890pgg.49.1533662390263; Tue, 07 Aug 2018 10:19:50 -0700 (PDT) Received: from mka.mtv.corp.google.com ([2620:15c:202:1:b6af:f85:ed6c:ac6a]) by smtp.gmail.com with ESMTPSA id 16-v6sm3398059pfp.6.2018.08.07.10.19.49 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 07 Aug 2018 10:19:49 -0700 (PDT) From: Matthias Kaehlcke To: Bard Liao , Oder Chiou , Liam Girdwood , Mark Brown , Jaroslav Kysela , Takashi Iwai Date: Tue, 7 Aug 2018 10:19:40 -0700 Message-Id: <20180807171940.150507-1-mka@chromium.org> X-Mailer: git-send-email 2.18.0.597.ga71716f1ad-goog MIME-Version: 1.0 Cc: alsa-devel@alsa-project.org, Nicolas Boichat , linux-kernel@vger.kernel.org, Matthias Kaehlcke , Guenter Roeck , Andy Shevchenko Subject: [alsa-devel] [PATCH v2] ASoC: rt5677: Fix initialization of rt5677_of_match.data X-BeenThere: alsa-devel@alsa-project.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: alsa-devel-bounces@alsa-project.org Sender: alsa-devel-bounces@alsa-project.org X-Virus-Scanned: ClamAV using ClamSMTP The driver expects to find the device id in rt5677_of_match.data, however it is currently assigned to rt5677_of_match.type. Fix this. The problem was found with the help of clang: sound/soc/codecs/rt5677.c:5010:36: warning: expression which evaluates to zero treated as a null pointer constant of type 'const void *' [-Wnon-literal-null-conversion] { .compatible = "realtek,rt5677", RT5677 }, ^~~~~~ Fixes: ddc9e69b9dc2 ("ASoC: rt5677: Hide platform data in the module sources") Signed-off-by: Matthias Kaehlcke Acked-by: Andy Shevchenko --- Changes in v2: - assign device id to data instead of 'type' - updated subject and commit message - added: 'Fixes' tag --- sound/soc/codecs/rt5677.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sound/soc/codecs/rt5677.c b/sound/soc/codecs/rt5677.c index 8a0181a2db08..47feef30dadb 100644 --- a/sound/soc/codecs/rt5677.c +++ b/sound/soc/codecs/rt5677.c @@ -5007,7 +5007,7 @@ static const struct regmap_config rt5677_regmap = { }; static const struct of_device_id rt5677_of_match[] = { - { .compatible = "realtek,rt5677", RT5677 }, + { .compatible = "realtek,rt5677", .data = (const void *)RT5677 }, { } }; MODULE_DEVICE_TABLE(of, rt5677_of_match);