Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

mtd: nand: s3c2410: Register cpufreq notifier only on S3C24xx

The driver registered for CPU frequency transitions to recalculate its
clock when ARM clock frequency changes (ratio between frequencies of
ARM's parent clock (fclk) and clock for peripherals remains fixed).

This is needed only on S3C24xx platform when cpufreq driver is enabled
so limit the ifdef to respective cpufreq Kconfig.

Suggested-by: Marek Szyprowski <m.szyprowski@samsung.com>
Signed-off-by: Krzysztof Kozlowski <k.kozlowski@samsung.com>
Signed-off-by: Boris Brezillon <boris.brezillon@free-electrons.com>

authored by

Krzysztof Kozlowski and committed by
Boris Brezillon
d9ca77f0 fc6b4d12

+2 -2
+2 -2
drivers/mtd/nand/s3c2410.c
··· 180 180 181 181 enum s3c_cpu_type cpu_type; 182 182 183 - #ifdef CONFIG_CPU_FREQ 183 + #ifdef CONFIG_ARM_S3C24XX_CPUFREQ 184 184 struct notifier_block freq_transition; 185 185 #endif 186 186 }; ··· 701 701 702 702 /* cpufreq driver support */ 703 703 704 - #ifdef CONFIG_CPU_FREQ 704 + #ifdef CONFIG_ARM_S3C24XX_CPUFREQ 705 705 706 706 static int s3c2410_nand_cpufreq_transition(struct notifier_block *nb, 707 707 unsigned long val, void *data)