linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/1] drivers/base/dma-buf.c: replace dma_buf_uninit_debugfs by debugfs_remove_recursive
@ 2014-06-27 20:32 Fabian Frederick
  2014-07-10  0:34 ` Greg Kroah-Hartman
  0 siblings, 1 reply; 3+ messages in thread
From: Fabian Frederick @ 2014-06-27 20:32 UTC (permalink / raw)
  To: linux-kernel
  Cc: Fabian Frederick, Sumit Semwal, Greg Kroah-Hartman, linux-media

null test before debugfs_remove_recursive is not needed so one line function
dma_buf_uninit_debugfs can be removed.

This patch calls debugfs_remove_recursive under CONFIG_DEBUG_FS

Cc: Sumit Semwal <sumit.semwal@linaro.org>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: linux-media@vger.kernel.org
Signed-off-by: Fabian Frederick <fabf@skynet.be>
---

This is untested.

 drivers/base/dma-buf.c | 13 +++----------
 1 file changed, 3 insertions(+), 10 deletions(-)

diff --git a/drivers/base/dma-buf.c b/drivers/base/dma-buf.c
index 840c7fa..184c0cb 100644
--- a/drivers/base/dma-buf.c
+++ b/drivers/base/dma-buf.c
@@ -701,12 +701,6 @@ static int dma_buf_init_debugfs(void)
 	return err;
 }
 
-static void dma_buf_uninit_debugfs(void)
-{
-	if (dma_buf_debugfs_dir)
-		debugfs_remove_recursive(dma_buf_debugfs_dir);
-}
-
 int dma_buf_debugfs_create_file(const char *name,
 				int (*write)(struct seq_file *))
 {
@@ -722,9 +716,6 @@ static inline int dma_buf_init_debugfs(void)
 {
 	return 0;
 }
-static inline void dma_buf_uninit_debugfs(void)
-{
-}
 #endif
 
 static int __init dma_buf_init(void)
@@ -738,6 +729,8 @@ subsys_initcall(dma_buf_init);
 
 static void __exit dma_buf_deinit(void)
 {
-	dma_buf_uninit_debugfs();
+#ifdef CONFIG_DEBUG_FS
+	debugfs_remove_recursive(dma_buf_debugfs_dir);
+#endif
 }
 __exitcall(dma_buf_deinit);
-- 
1.8.4.5


^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2014-07-12 12:26 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-06-27 20:32 [PATCH 1/1] drivers/base/dma-buf.c: replace dma_buf_uninit_debugfs by debugfs_remove_recursive Fabian Frederick
2014-07-10  0:34 ` Greg Kroah-Hartman
2014-07-12 12:26   ` Fabian Frederick

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).