From patchwork Mon May 21 21:54:49 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Mack X-Patchwork-Id: 10416797 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id AB6D36053B for ; Mon, 21 May 2018 21:55:11 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 996CB28A96 for ; Mon, 21 May 2018 21:55:11 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 88DAF28AAF; Mon, 21 May 2018 21:55:11 +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.9 required=2.0 tests=BAYES_00, MAILING_LIST_MULTI, RCVD_IN_DNSWL_NONE 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 1CD8728A96 for ; Mon, 21 May 2018 21:55:10 +0000 (UTC) Received: from alsa0.perex.cz (localhost [127.0.0.1]) by alsa0.perex.cz (Postfix) with ESMTP id EAD1C26765E; Mon, 21 May 2018 23:55:05 +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 A0E1F26762F; Mon, 21 May 2018 23:55:02 +0200 (CEST) Received: from mail.bugwerft.de (mail.bugwerft.de [46.23.86.59]) by alsa0.perex.cz (Postfix) with ESMTP id 885C7267380 for ; Mon, 21 May 2018 23:55:00 +0200 (CEST) Received: from localhost.localdomain (pD95EF5FE.dip0.t-ipconnect.de [217.94.245.254]) by mail.bugwerft.de (Postfix) with ESMTPSA id E70A52845A6; Mon, 21 May 2018 21:52:27 +0000 (UTC) From: Daniel Mack To: lgirdwood@gmail.com, broonie@kernel.org Date: Mon, 21 May 2018 23:54:49 +0200 Message-Id: <20180521215450.30557-1-daniel@zonque.org> X-Mailer: git-send-email 2.14.3 Cc: alsa-devel@alsa-project.org, Daniel Mack Subject: [alsa-devel] [PATCH 1/2] ASoC: wm8782: add device-tree matching table X-BeenThere: alsa-devel@alsa-project.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: alsa-devel-bounces@alsa-project.org Sender: alsa-devel-bounces@alsa-project.org X-Virus-Scanned: ClamAV using ClamSMTP This is needed when the codec is instanciated from from a device tree. Signed-off-by: Daniel Mack --- sound/soc/codecs/wm8782.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/sound/soc/codecs/wm8782.c b/sound/soc/codecs/wm8782.c index 7949703f3d04..317db9a149a7 100644 --- a/sound/soc/codecs/wm8782.c +++ b/sound/soc/codecs/wm8782.c @@ -67,9 +67,18 @@ static int wm8782_probe(struct platform_device *pdev) &soc_component_dev_wm8782, &wm8782_dai, 1); } +#ifdef CONFIG_OF +static const struct of_device_id wm8782_of_match[] = { + { .compatible = "wlf,wm8782", }, + { } +}; +MODULE_DEVICE_TABLE(of, wm8782_of_match); +#endif + static struct platform_driver wm8782_codec_driver = { .driver = { .name = "wm8782", + .of_match_table = of_match_ptr(wm8782_of_match), }, .probe = wm8782_probe, };