Skip to content

Commit

Permalink
cpufreq: tegra20: Check if this is Tegra20 machine
Browse files Browse the repository at this point in the history
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 <digetx@gmail.com>
Acked-by: Viresh Kumar <viresh.kumar@linaro.org>
Acked-by: Thierry Reding <treding@nvidia.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
  • Loading branch information
Dmitry Osipenko authored and Rafael J. Wysocki committed May 21, 2018
1 parent f39d4d5 commit a413d2c
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions drivers/cpufreq/tegra20-cpufreq.c
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
#include <linux/err.h>
#include <linux/init.h>
#include <linux/module.h>
#include <linux/of.h>
#include <linux/types.h>

static struct cpufreq_frequency_table freq_table[] = {
Expand Down Expand Up @@ -158,6 +159,9 @@ static int __init tegra_cpufreq_init(void)
{
int err;

if (!of_machine_is_compatible("nvidia,tegra20"))
return -ENODEV;

cpu_clk = clk_get_sys(NULL, "cclk");
if (IS_ERR(cpu_clk))
return PTR_ERR(cpu_clk);
Expand Down

0 comments on commit a413d2c

Please sign in to comment.