From patchwork Mon Aug 7 03:13:05 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Fabio Estevam X-Patchwork-Id: 9884329 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 0BA2E603F2 for ; Mon, 7 Aug 2017 03:13:15 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id F17FB28477 for ; Mon, 7 Aug 2017 03:13:14 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id E60F32852E; Mon, 7 Aug 2017 03:13:14 +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.3 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED,FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,RCVD_IN_SORBS_SPAM, T_DKIM_INVALID 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 E0A1C28477 for ; Mon, 7 Aug 2017 03:13:13 +0000 (UTC) Received: from alsa0.perex.cz (localhost [127.0.0.1]) by alsa0.perex.cz (Postfix) with ESMTP id 392F5266EF3; Mon, 7 Aug 2017 05:13:11 +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 5FAC9266EF9; Mon, 7 Aug 2017 05:13:10 +0200 (CEST) Received: from mail-qt0-f193.google.com (mail-qt0-f193.google.com [209.85.216.193]) by alsa0.perex.cz (Postfix) with ESMTP id 6D505266DBC for ; Mon, 7 Aug 2017 05:13:08 +0200 (CEST) Received: by mail-qt0-f193.google.com with SMTP id p3so6631783qtg.5 for ; Sun, 06 Aug 2017 20:13:08 -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; bh=dfRlCTrEJYxUdD1o6tEYFc3S0Gmg8JRdhWfTOV6Kl3A=; b=Fp00fy0LfqUWK+PzwG8Kgbirie3JJl9O3UBUA/FjR3W0IAVpfdyZsvCyJftFr8OUci +cHYQfe0Q1mAtZL1+A9QiH2IWI9z0v3TNC8AvXwsObgBw3eU++8O5jlmm8NC8nt8JIh3 gym6nkloq3PJnCUbjE47IhQd+S8R72IbieSPFrVVJl9uFU7Iu3LqNT5C/tReqCTQOEXw hbGDb7NtB+G+xow2b3Nmmm05j/r4M4BgkCoNmuy7zqkDJ0zIkxgAgQpr+obT0fspKvE0 yUEjQ0lIWpbJCEdkWq4BkM3DvXlrfzYyGTkpYuwJFYmA5gXgxJOg2JJHHGVt78LyXX4O g2DQ== 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; bh=dfRlCTrEJYxUdD1o6tEYFc3S0Gmg8JRdhWfTOV6Kl3A=; b=TMnd8hHdzicF/V64ymSKiUK65If7QH8aKqRDB+ySo560WNY+0PdwE6/+WO2k6NdhUi HKah2iMErgCuq4TW+uTeBRLE6/cty5VGMwMGNznow7DOcOTXhI6lUxQAbmqHbrI/L/3K zzp2Fs4cJb+2npyA/wA+Ge6lg+UkYRalEpdzwUbzErdzEnD5xQR6Qn+r0VgHLL2tYdRc Ka/ukUc7DRAz+pySqTBsyVB8NytPuGZyFl1JTkSGt3o/dveQNmB0fJql/xv4D9vU8AbE dYXq2blrngl9rmADo5deD97xZIYYVHDduSiLtez4a8oT5t+HLk7gGz/AjUGdUiSdKwIx tToA== X-Gm-Message-State: AHYfb5i5A6arlM3wITr6tUTHKz8p2oyHKCTm6hdHdrg9af8uIbKYlO0D clNBtQYN2rC+GQ== X-Received: by 10.200.34.201 with SMTP id g9mr12995902qta.143.1502075587062; Sun, 06 Aug 2017 20:13:07 -0700 (PDT) Received: from localhost.localdomain ([187.180.180.203]) by smtp.gmail.com with ESMTPSA id y10sm5333567qtb.57.2017.08.06.20.13.05 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Sun, 06 Aug 2017 20:13:06 -0700 (PDT) From: Fabio Estevam To: broonie@kernel.org Date: Mon, 7 Aug 2017 00:13:05 -0300 Message-Id: <1502075586-23581-1-git-send-email-festevam@gmail.com> X-Mailer: git-send-email 2.7.4 Cc: alsa-devel@alsa-project.org, Fabio Estevam Subject: [alsa-devel] [PATCH 1/2] ASoC: soc-core: Remove unneeded dentry member from snd_soc_codec 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 There is no need to have the *debugfs_reg dentry member as part of the snd_soc_codec structure as its only usage is inside soc_init_codec_debugfs(). Use a local dentry variable instead. Signed-off-by: Fabio Estevam --- include/sound/soc.h | 4 ---- sound/soc/soc-core.c | 9 +++++---- 2 files changed, 5 insertions(+), 8 deletions(-) diff --git a/include/sound/soc.h b/include/sound/soc.h index 9d6e1db..42e2e50 100644 --- a/include/sound/soc.h +++ b/include/sound/soc.h @@ -897,10 +897,6 @@ struct snd_soc_codec { /* component */ struct snd_soc_component component; - -#ifdef CONFIG_DEBUG_FS - struct dentry *debugfs_reg; -#endif }; /* codec driver */ diff --git a/sound/soc/soc-core.c b/sound/soc/soc-core.c index 13c875e..e93a72c 100644 --- a/sound/soc/soc-core.c +++ b/sound/soc/soc-core.c @@ -339,11 +339,12 @@ static void soc_cleanup_component_debugfs(struct snd_soc_component *component) static void soc_init_codec_debugfs(struct snd_soc_component *component) { struct snd_soc_codec *codec = snd_soc_component_to_codec(component); + struct dentry *debugfs_reg; - codec->debugfs_reg = debugfs_create_file("codec_reg", 0644, - codec->component.debugfs_root, - codec, &codec_reg_fops); - if (!codec->debugfs_reg) + debugfs_reg = debugfs_create_file("codec_reg", 0644, + codec->component.debugfs_root, + codec, &codec_reg_fops); + if (!debugfs_reg) dev_warn(codec->dev, "ASoC: Failed to create codec register debugfs file\n"); }