From patchwork Mon Aug 7 03:16:53 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Fabio Estevam X-Patchwork-Id: 9884347 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 D3E7B603F2 for ; Mon, 7 Aug 2017 03:17:52 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id C755D28538 for ; Mon, 7 Aug 2017 03:17:52 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id B3D2C2852E; Mon, 7 Aug 2017 03:17:52 +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 0A5B328535 for ; Mon, 7 Aug 2017 03:17:51 +0000 (UTC) Received: from alsa0.perex.cz (localhost [127.0.0.1]) by alsa0.perex.cz (Postfix) with ESMTP id 152D2266F7F; Mon, 7 Aug 2017 05:17:08 +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 EE551266F7F; Mon, 7 Aug 2017 05:17:05 +0200 (CEST) Received: from mail-qk0-f195.google.com (mail-qk0-f195.google.com [209.85.220.195]) by alsa0.perex.cz (Postfix) with ESMTP id 31417266DBC for ; Mon, 7 Aug 2017 05:17:03 +0200 (CEST) Received: by mail-qk0-f195.google.com with SMTP id a77so6553246qkb.2 for ; Sun, 06 Aug 2017 20:17:03 -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=GG39DMHbHpoy0zRv1tTT3AcFYgrvV3FwPJUvSPQz4JM=; b=hv4c9jz6ZhJ5ZlwggjcR58tDpl8DPdsP8HSgTjLvyEl9gXe7ErvAZVl+T9q36AXf0v x9e6roeKk2S2+Yy+uV/pZ2w+9kPQ/v8cV5Sp4/E4S4Fh7q//QaINy9WRGKKEnJTS5diQ FVzEI88PcYguglDd9YACKCZG/pPjV9X+uVZB/MnoSfu+8eC0slOF1281K+sJtMQzDVCx u0Ufed+JXo9sFgaOHJIJAOdRa6fiFae+cd7PGkC5Ocg81+OKjb5k4UC8UWFyAD3sIzbS 67UphztKExOlLP7CRo6r4/a1BZ+OHVXAX9btrtA1MgFS/4rtm6914061s1g+G0Dq9QWt pIXA== 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=GG39DMHbHpoy0zRv1tTT3AcFYgrvV3FwPJUvSPQz4JM=; b=a+860YamN+oaNOs+i2gXB2WVD/rPULCpidcNRlWy28CylqMuYzNNCzbn6zYEvFhZV4 76sXACCmZjjHLeXt9DptlIbgdJNbdFTvkbYVtxMGq3GHdibFoi984OYJSbOVDpG3vJ9T P/3n3QtpAVsQN8poeswR8BPmtr1O5/edf757Zmro4C1cudS67fBPFwWg95NazmVc0UF4 xHQimSjdHqsxcJNSTNuh95y9jCniM1yEVqaJUvJocBIZif2eCf1kwqUWAgIPWVXk9wGZ m7/51YBduLTnMDpaomGTnwgHIFWdPSfh/h8M5Yb4uSTsMOaUbuY3W8+RyokTk9P+qQXV 1Caw== X-Gm-Message-State: AHYfb5iExPwrTHMcFdmKlI39Y/PSabSyNwbbnU/IKPlP4zwR7xKnKlXw RRYPzMJ0JCWQNw== X-Received: by 10.55.7.7 with SMTP id 7mr12505959qkh.121.1502075823206; Sun, 06 Aug 2017 20:17:03 -0700 (PDT) Received: from localhost.localdomain ([187.180.180.203]) by smtp.gmail.com with ESMTPSA id v38sm5121213qtg.68.2017.08.06.20.17.01 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Sun, 06 Aug 2017 20:17:02 -0700 (PDT) From: Fabio Estevam To: broonie@kernel.org Date: Mon, 7 Aug 2017 00:16:53 -0300 Message-Id: <1502075814-23766-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 v2 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 --- Changes since v1: - None 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"); }