From 3e16f28d5eda2135e981d5795ebba9d249080426 Mon Sep 17 00:00:00 2001 From: Tao Huang Date: Thu, 2 Mar 2023 15:59:54 +0800 Subject: [PATCH] ANDROID: clk: Enable writable debugfs files only if CONFIG_ANDROID_BINDER_IPC=y Restore CLOCK_ALLOW_WRITE_DEBUGFS define when system is Linux without Android runtime. Fixes: 861a024589b3 ("ANDROID: clk: Enable writable debugfs files") Signed-off-by: Tao Huang Change-Id: I7e5e8bade70191ceeca819dbbb45d84c687925c7 --- drivers/clk/clk.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/drivers/clk/clk.c b/drivers/clk/clk.c index bec881941483..5b5b4ddde72c 100644 --- a/drivers/clk/clk.c +++ b/drivers/clk/clk.c @@ -3107,7 +3107,11 @@ static int clk_dump_show(struct seq_file *s, void *data) } DEFINE_SHOW_ATTRIBUTE(clk_dump); +#ifdef CONFIG_ANDROID_BINDER_IPC #define CLOCK_ALLOW_WRITE_DEBUGFS +#else +#undef CLOCK_ALLOW_WRITE_DEBUGFS +#endif #ifdef CLOCK_ALLOW_WRITE_DEBUGFS /* * This can be dangerous, therefore don't provide any real compile time