OSDN Git Service

mfd: wcd9xxx: disable slimbus register access for debugfs
authorDavid Lin <dtwlin@google.com>
Thu, 12 Oct 2017 23:08:18 +0000 (16:08 -0700)
committerArian <arian.kulmer@web.de>
Tue, 19 Nov 2019 14:36:10 +0000 (15:36 +0100)
This patch disables default slimbus access exposed through debugfs.

Bug: 67430947
Change-Id: Iaf1b7cdf638dbc6e6de3681b8418f1840b94ccad
Signed-off-by: David Lin <dtwlin@google.com>
drivers/mfd/wcd9xxx-core.c

index 65195f5..7224bd6 100644 (file)
@@ -603,7 +603,7 @@ static void wcd9xxx_device_exit(struct wcd9xxx *wcd9xxx)
 }
 
 
-#ifdef CONFIG_DEBUG_FS
+#if defined(CONFIG_DEBUG_FS) && defined(WCD9XXX_CORE_DEBUG)
 struct wcd9xxx *debugCodec;
 
 static struct dentry *debugfs_wcd9xxx_dent;
@@ -1392,7 +1392,7 @@ static int wcd9xxx_slim_probe(struct slim_device *slim)
                        __func__, ret);
                goto err_slim_add;
        }
-#ifdef CONFIG_DEBUG_FS
+#if defined(CONFIG_DEBUG_FS) && defined(WCD9XXX_CORE_DEBUG)
        debugCodec = wcd9xxx;
 
        debugfs_wcd9xxx_dent = debugfs_create_dir
@@ -1437,7 +1437,7 @@ static int wcd9xxx_slim_remove(struct slim_device *pdev)
        struct wcd9xxx *wcd9xxx;
        struct wcd9xxx_pdata *pdata = pdev->dev.platform_data;
 
-#ifdef CONFIG_DEBUG_FS
+#if defined(CONFIG_DEBUG_FS) && defined(WCD9XXX_CORE_DEBUG)
        debugfs_remove_recursive(debugfs_wcd9xxx_dent);
 #endif
        wcd9xxx = slim_get_devicedata(pdev);