[PATCH] clocksource/drivers/sprd: Fix Kconfig dependency

From: Chunyan Zhang
Date: Thu May 03 2018 - 09:14:00 EST


SPRD arch doesn't select SPRD_TIMER, so this config would not
appear even if ARCH_SPRD is set and COMPILE_TEST is not.

Fix the Kconfig selection rule by letting the SPRD arch to select.

This patch also sets the default value of SPRD_TIMER with ARCH_SPRD,
but it still is selectable to users.

Signed-off-by: Chunyan Zhang <chunyan.zhang@xxxxxxxxxxxxxx>
---
drivers/clocksource/Kconfig | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/drivers/clocksource/Kconfig b/drivers/clocksource/Kconfig
index 619b120..c89e4d6 100644
--- a/drivers/clocksource/Kconfig
+++ b/drivers/clocksource/Kconfig
@@ -468,8 +468,9 @@ config MTK_TIMER
Support for Mediatek timer driver.

config SPRD_TIMER
- bool "Spreadtrum timer driver" if COMPILE_TEST
- depends on HAS_IOMEM
+ bool "Spreadtrum timer driver"
+ depends on HAS_IOMEM && (ARCH_SPRD || COMPILE_TEST)
+ default ARCH_SPRD
select TIMER_OF
help
Enables support for the Spreadtrum timer driver.
--
2.7.4