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: 861a024589 ("ANDROID: clk: Enable writable debugfs files")
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
Change-Id: I7e5e8bade70191ceeca819dbbb45d84c687925c7
This commit is contained in:
Tao Huang
2023-03-02 15:59:54 +08:00
parent 4089e3ba56
commit 3e16f28d5e

View File

@@ -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