Skip to content

Commit a413d2c

Browse files
digetxrafaeljw
authored andcommitted
cpufreq: tegra20: Check if this is Tegra20 machine
Don't even try to request the clocks during of module initialization on non-Tegra20 machines (this is the case for a multi-platform kernel) for consistency. Signed-off-by: Dmitry Osipenko <[email protected]> Acked-by: Viresh Kumar <[email protected]> Acked-by: Thierry Reding <[email protected]> Signed-off-by: Rafael J. Wysocki <[email protected]>
1 parent f39d4d5 commit a413d2c

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

drivers/cpufreq/tegra20-cpufreq.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
#include <linux/err.h>
2222
#include <linux/init.h>
2323
#include <linux/module.h>
24+
#include <linux/of.h>
2425
#include <linux/types.h>
2526

2627
static struct cpufreq_frequency_table freq_table[] = {
@@ -158,6 +159,9 @@ static int __init tegra_cpufreq_init(void)
158159
{
159160
int err;
160161

162+
if (!of_machine_is_compatible("nvidia,tegra20"))
163+
return -ENODEV;
164+
161165
cpu_clk = clk_get_sys(NULL, "cclk");
162166
if (IS_ERR(cpu_clk))
163167
return PTR_ERR(cpu_clk);

0 commit comments

Comments
 (0)