From patchwork Mon Aug 7 12:08:52 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Fabio Estevam X-Patchwork-Id: 9885197 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 EA7C7603B4 for ; Mon, 7 Aug 2017 12:09:08 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id DBCCC284E3 for ; Mon, 7 Aug 2017 12:09:08 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id D0A67285AF; Mon, 7 Aug 2017 12:09:08 +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 133A9284E3 for ; Mon, 7 Aug 2017 12:09:07 +0000 (UTC) Received: from alsa0.perex.cz (localhost [127.0.0.1]) by alsa0.perex.cz (Postfix) with ESMTP id BB8652671D1; Mon, 7 Aug 2017 14:09: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 789972671D2; Mon, 7 Aug 2017 14:09:04 +0200 (CEST) Received: from mail-qk0-f193.google.com (mail-qk0-f193.google.com [209.85.220.193]) by alsa0.perex.cz (Postfix) with ESMTP id 7FE352669F6 for ; Mon, 7 Aug 2017 14:09:01 +0200 (CEST) Received: by mail-qk0-f193.google.com with SMTP id q66so220189qki.1 for ; Mon, 07 Aug 2017 05:09:01 -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=W1/6z/7OIBb+qb8Px04nIDsbEvg5XkZRcIDbAmZmA10=; b=Cwa18/Vd5OyA/wYbB2R/I7KWiBTic48p7ikvnq9lLw9Uo7r6HXoQIMhN8O2ZY5R8dz wxIxmNDGgp8mWwIghhpYuMbU+iAkY+A7EY/VleP3MuWNb+WCdciIsRhx7icoDHnKbrei ugqF81/H0wSfJhIyYud4JBX88dh/crTuma6uziA4XmIlObVBmAffD3Paw7mTleHpqXYO JjDAFn1na3G24KPOjlxCiU1ek9DwLDJrm9SmOB3H1tpOoSEhPkIwErh0ZEX8UwY12/VJ LwSa82jfJe2TWGuZtd9d5szUH6QdN/HnQWnoRi6RIVSvCJf5XCUdYhF0ZLFL8OTKcfRh 74Pw== 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=W1/6z/7OIBb+qb8Px04nIDsbEvg5XkZRcIDbAmZmA10=; b=F+GS7izL9mb7lDnpZsy7bjzhdkdeFQDLcuF8FyWaLhgcBlU6b7RWVObMTdFJKhui9F A/R6auNGKLa8oF/NRgjwmlmoBVuwzW9Lz9ZvFQ5Rm8JmvL2suXm5C22uG3XiAmGp0LiC +JaLk0fN8X3n9YE5ouKpJDjIakYG0FdksNJVeus+4Tvug+1xz85DLO1/dKOBJIjW+gOG wd5Z8KrBzpaXdud19G8U+XYf2SArN9npEhAoIJD6L3Ja9aMv3RnrsRpsSoIYFk8KH7xj +U8B1WUeugLToXA+DbyB99lMCDjmJvAVQdBO07/mt6N2chfxHAUHM+JCAJOQkHzW1KD3 4cIQ== X-Gm-Message-State: AHYfb5gtm3xytfRh6L16Z8no7pNg21nHKyi1vOmC51hCedHzTL5OGmpi C8C7GughCPEQJQ== X-Received: by 10.55.71.76 with SMTP id u73mr378088qka.25.1502107740917; Mon, 07 Aug 2017 05:09:00 -0700 (PDT) Received: from localhost.localdomain ([187.180.180.203]) by smtp.gmail.com with ESMTPSA id w63sm1935769qkb.67.2017.08.07.05.08.58 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 07 Aug 2017 05:09:00 -0700 (PDT) From: Fabio Estevam To: broonie@kernel.org Date: Mon, 7 Aug 2017 09:08:52 -0300 Message-Id: <1502107733-29628-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 v3 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 v2: - 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"); }