Received: by 2002:a25:ab43:0:0:0:0:0 with SMTP id u61csp2418657ybi; Mon, 17 Jun 2019 04:35:49 -0700 (PDT) X-Google-Smtp-Source: APXvYqy8NvWZms3YNwIzEhB71YnLvPFuUMq+4fvMIA2noyjaatuR04M8hND3QsTli3B5eryqcd0G X-Received: by 2002:a17:902:778d:: with SMTP id o13mr56992317pll.82.1560771349580; Mon, 17 Jun 2019 04:35:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1560771349; cv=none; d=google.com; s=arc-20160816; b=peBLr6jPNT+5dttqHZdBmgH9kesskDDx2F0g6F41s46R8q9/MTSz2AAqbQsLxTPXC3 M9CSGwPSPncw/d7TCf8BA96vg7T8LCmCuxORXnbdZcuIbAU5eu8JeGCJVyG9ZywJt1DC WrmptUcpwGxnbM50cLYYdUYkv747tXYzUMXPO+cKMc7sHOY0Wr412sZ7Xs1+icQLqPOX qXMieaxdUa+c+r3pY2vNuP+fJlVn/Amv84ICd2neiC2wV6ShuG0aHwwTGfJqiqYz7DaL Yh6NnOEJW3rqambktiL4kC6N9iUYxH5/c66r2XP+Dz6Z/5OJHq1AXZ2ZrxIIJ1IbfQ79 VuAQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=Tha/AS0p+dF4/e6UYMTmPmoebqfeyiP2AlOFHBBeHKM=; b=SImLwafm7A+pDx4P35HAy7ItZxu6iDtUUXw7LNaLQn0jCfL/GDstrXpVeVQapork4/ MHtPG3huitsfmLm/u9ULSg1DEV2sYrjf+Tqx5mTaoe2VWn3Ddcnd4m3UHDf13+rB1PXM 3CQYclWno7F/qyOWTyWZOxi8jxGDP8lVbJBGOh6Bj90fogBK0b9OO85sj5SrgbBA5U6C RHN7YN0LYJr1ms152hncv0LuyCbnEpzeIXg1a89R1fZWinl4F3aByYDHL9MzGeHNkEQG 6F3kBG5VVu93YEiPamXZOeiIMOcEzAicJKepUEuJxL9iYxTEHhW24Jtfc/2qchFgJzcj TfPQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id u65si10499598pgu.415.2019.06.17.04.35.33; Mon, 17 Jun 2019 04:35:49 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728215AbfFQLfJ (ORCPT + 99 others); Mon, 17 Jun 2019 07:35:09 -0400 Received: from mga12.intel.com ([192.55.52.136]:54390 "EHLO mga12.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728171AbfFQLfG (ORCPT ); Mon, 17 Jun 2019 07:35:06 -0400 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga006.fm.intel.com ([10.253.24.20]) by fmsmga106.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 17 Jun 2019 04:35:06 -0700 X-ExtLoop1: 1 Received: from xxx.igk.intel.com ([10.237.93.170]) by fmsmga006.fm.intel.com with ESMTP; 17 Jun 2019 04:35:04 -0700 From: =?UTF-8?q?Amadeusz=20S=C5=82awi=C5=84ski?= To: alsa-devel@alsa-project.org Cc: Jaroslav Kysela , Takashi Iwai , Liam Girdwood , Mark Brown , Pierre-Louis Bossart , Jie Yang , Cezary Rojewski , linux-kernel@vger.kernel.org, =?UTF-8?q?Amadeusz=20S=C5=82awi=C5=84ski?= Subject: [PATCH v2 06/11] ASoC: Intel: Skylake: Add function to cleanup debugfs interface Date: Mon, 17 Jun 2019 13:36:39 +0200 Message-Id: <20190617113644.25621-7-amadeuszx.slawinski@linux.intel.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20190617113644.25621-1-amadeuszx.slawinski@linux.intel.com> References: <20190617113644.25621-1-amadeuszx.slawinski@linux.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Currently debugfs has no cleanup function. Add skl_debufs_exit function so we can clean after ourselves properly. Signed-off-by: Amadeusz Sławiński --- sound/soc/intel/skylake/skl-debug.c | 9 +++++++++ sound/soc/intel/skylake/skl.h | 5 +++++ 2 files changed, 14 insertions(+) diff --git a/sound/soc/intel/skylake/skl-debug.c b/sound/soc/intel/skylake/skl-debug.c index 69cbe9eb026b..b9b4a72a4334 100644 --- a/sound/soc/intel/skylake/skl-debug.c +++ b/sound/soc/intel/skylake/skl-debug.c @@ -251,3 +251,12 @@ struct skl_debug *skl_debugfs_init(struct skl *skl) debugfs_remove_recursive(d->fs); return NULL; } + +void skl_debugfs_exit(struct skl *skl) +{ + struct skl_debug *d = skl->debugfs; + + debugfs_remove_recursive(d->fs); + + d = NULL; +} diff --git a/sound/soc/intel/skylake/skl.h b/sound/soc/intel/skylake/skl.h index e7870ec81a9b..6fab1a2e133a 100644 --- a/sound/soc/intel/skylake/skl.h +++ b/sound/soc/intel/skylake/skl.h @@ -155,6 +155,7 @@ struct skl_module_cfg; #ifdef CONFIG_DEBUG_FS struct skl_debug *skl_debugfs_init(struct skl *skl); +void skl_debugfs_exit(struct skl *skl); void skl_debug_init_module(struct skl_debug *d, struct snd_soc_dapm_widget *w, struct skl_module_cfg *mconfig); @@ -163,6 +164,10 @@ static inline struct skl_debug *skl_debugfs_init(struct skl *skl) { return NULL; } + +static inline void skl_debugfs_exit(struct skl *skl) +{} + static inline void skl_debug_init_module(struct skl_debug *d, struct snd_soc_dapm_widget *w, struct skl_module_cfg *mconfig) -- 2.17.1