From patchwork Wed Dec 19 20:11:16 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?b?TWljaGHFgiBNaXJvc8WCYXc=?= X-Patchwork-Id: 10738095 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 33D5514E2 for ; Wed, 19 Dec 2018 20:11:38 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 2723E286BC for ; Wed, 19 Dec 2018 20:11:38 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 2529E286C7; Wed, 19 Dec 2018 20:11:38 +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=-1.9 required=2.0 tests=BAYES_00,DKIM_ADSP_ALL, DKIM_INVALID,DKIM_SIGNED,MAILING_LIST_MULTI,RCVD_IN_DNSWL_NONE autolearn=no 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 7CE5B286D3 for ; Wed, 19 Dec 2018 20:11:37 +0000 (UTC) Received: from alsa0.perex.cz (localhost [127.0.0.1]) by alsa0.perex.cz (Postfix) with ESMTP id E8814267B42; Wed, 19 Dec 2018 21:11:24 +0100 (CET) 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 0D5A7267B34; Wed, 19 Dec 2018 21:11:20 +0100 (CET) Received: from rere.qmqm.pl (rere.qmqm.pl [91.227.64.183]) by alsa0.perex.cz (Postfix) with ESMTP id A65C6267B31 for ; Wed, 19 Dec 2018 21:11:16 +0100 (CET) Received: from remote.user (localhost [127.0.0.1]) by rere.qmqm.pl (Postfix) with ESMTPSA id 43KmFm2QxWzLn; Wed, 19 Dec 2018 21:09:48 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=rere.qmqm.pl; s=1; t=1545250188; bh=Ww6hjTFUQwF8WGsPOTgGNV84VmF4pOZ5aCK52+ooeas=; h=Date:In-Reply-To:References:From:Subject:To:Cc:From; b=lVf61jWrdZN2zJnxYcMvMg+XTnv8uVQnjrbL0QbbePYvbOYAOZCl8YxWwGk4o4xxI 09DNcj1bB63o49f63+++0jQCIVVy1bX5AJn4eq5qHTpKR5w+oHqbVImCOvQeqTzy6p Y/CVuR4Whz5Gvq+xAnoDexTNcm6AaH2AeNp0LK2iHW6tvfD7n/86y4BSEVP0EDkXIJ OrC8VkFfJJbEqZB5+leDr7tbCxLuDM33Q3AR3acdBz2VmN4IoLmdsh7C7T0p/ssKts Uk152W56YFCvGjFsXaag3s6XUqIaJjsscpHGIIUzC8Jb/Yc8p0b5Fv9wEmGFAjmhUF pRXAbW84I8CZQ== X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.100.2 at mail Date: Wed, 19 Dec 2018 21:11:16 +0100 Message-Id: <30114be8a4e9eda7c6b2a6f555397f51f9a389f8.1545249666.git.mirq-linux@rere.qmqm.pl> In-Reply-To: References: From: =?utf-8?b?TWljaGHFgiBNaXJvc8WCYXc=?= MIME-Version: 1.0 To: patches@opensource.cirrus.com, alsa-devel@alsa-project.org Cc: Takashi Iwai , Mark Brown , Liam Girdwood Subject: [alsa-devel] [PATCH 3/4] ASoC: wm8904: save model id directly in of_device_id.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 Save 2x unsigned int of .rodata. Signed-off-by: Michał Mirosław Acked-by: Charles Keepax --- sound/soc/codecs/wm8904.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/sound/soc/codecs/wm8904.c b/sound/soc/codecs/wm8904.c index f8a17fcdfdeb..2813b7f6a58e 100644 --- a/sound/soc/codecs/wm8904.c +++ b/sound/soc/codecs/wm8904.c @@ -2123,16 +2123,13 @@ static const struct regmap_config wm8904_regmap = { }; #ifdef CONFIG_OF -static enum wm8904_type wm8904_data = WM8904; -static enum wm8904_type wm8912_data = WM8912; - static const struct of_device_id wm8904_of_match[] = { { .compatible = "wlf,wm8904", - .data = &wm8904_data, + .data = (void *)WM8904, }, { .compatible = "wlf,wm8912", - .data = &wm8912_data, + .data = (void *)WM8912, }, { /* sentinel */ } @@ -2173,7 +2170,7 @@ static int wm8904_i2c_probe(struct i2c_client *i2c, match = of_match_node(wm8904_of_match, i2c->dev.of_node); if (match == NULL) return -EINVAL; - wm8904->devtype = *((enum wm8904_type *)match->data); + wm8904->devtype = (enum wm8904_type)match->data; } else { wm8904->devtype = id->driver_data; }