Received: by 2002:a25:ab43:0:0:0:0:0 with SMTP id u61csp6807060ybi; Wed, 5 Jun 2019 06:44:19 -0700 (PDT) X-Google-Smtp-Source: APXvYqxwDVW0DmN3+AMAE5OL61JhwC7ZZCZQfP5/UOsV0Gqc1DCZq4/rtR5gDVA8Cpuj1AxIzNyJ X-Received: by 2002:a17:902:b947:: with SMTP id h7mr609164pls.267.1559742259471; Wed, 05 Jun 2019 06:44:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1559742259; cv=none; d=google.com; s=arc-20160816; b=ESMU/gP0dMmUZlUmvxS10cWOU+QMRQqwoy7Oc87udnBUEwSBKpEH4oFwo+z64ZKZ4j DAiYleMclb1R9qdXEDgghuUXjwP6wt5Wx+2/NqWIUpi30M/WGFvHHrI5wP3wDAKndmju FzxF+lZlz48Gn6aGk/ZAwXgb0KdxemY7o8SU+uvwCCIYlxvIOU47tkrhE5vjek5U15/W dWGvPL1JLkpkaM6MAeAtzgUaikvwsRATgPADyBDist9YY2wqfeNbjapkyjnZWh3NYlxv v2GRBwHxa+oIM8vL7NfSVXyuPx4MGCBXgH/Gv75fb7WoWpqMLKjHTl0dNsCiKogdw8u1 NZBQ== 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=oQhUTJ2l+0Y7/us3UT6f9J04RNAe9ELb/r9++lR33RE=; b=bsOL98PsP6obA4jxeF2BzgEZ7H4OGVk/PdDYdOQTvUa+IRznWYom9OYyGwskL5B3Hr WohyJK14zeZjERnIjvrzFCOTGVPoaCWanWNJzIbcGu/rksMk/Y0yZ9FN8C8BSXSg7MCr sZ36J7jCeXL6HDxyNZY5YzJNIfOxAu4K8dMtd77ybjY2WKMDDrnTnL0h41thv+7DoF6l lkG2dU7ArgCS2vDfVs4l4hnEyo9buA6TNLoKQtQS/oCP9wAJ/P9IBHmHl3umr+1Igaky odczS2J2inMGQRlPdveJOmNxNDH2S7hh3fmd+6LHjfc7bFSmgFA9QmW38U3VLWrJa4zm YPig== 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 99si28650077pla.397.2019.06.05.06.44.03; Wed, 05 Jun 2019 06:44:19 -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 S1728187AbfFENmi (ORCPT + 99 others); Wed, 5 Jun 2019 09:42:38 -0400 Received: from mga14.intel.com ([192.55.52.115]:51941 "EHLO mga14.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728113AbfFENmg (ORCPT ); Wed, 5 Jun 2019 09:42:36 -0400 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga004.jf.intel.com ([10.7.209.38]) by fmsmga103.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 05 Jun 2019 06:42:36 -0700 X-ExtLoop1: 1 Received: from xxx.igk.intel.com ([10.237.93.170]) by orsmga004.jf.intel.com with ESMTP; 05 Jun 2019 06:42:33 -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 07/14] ASoC: Intel: Skylake: Add function to cleanup debugfs interface Date: Wed, 5 Jun 2019 15:45:49 +0200 Message-Id: <20190605134556.10322-8-amadeuszx.slawinski@linux.intel.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20190605134556.10322-1-amadeuszx.slawinski@linux.intel.com> References: <20190605134556.10322-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 5d7ac2ee7a3c..e81c3dafc0d0 100644 --- a/sound/soc/intel/skylake/skl-debug.c +++ b/sound/soc/intel/skylake/skl-debug.c @@ -259,3 +259,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 85f8bb6687dc..d2e269867a44 100644 --- a/sound/soc/intel/skylake/skl.h +++ b/sound/soc/intel/skylake/skl.h @@ -164,6 +164,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); @@ -172,6 +173,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