Commit a413d2ce authored by Dmitry Osipenko's avatar Dmitry Osipenko Committed by Rafael J. Wysocki

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: default avatarDmitry Osipenko <digetx@gmail.com>
Acked-by: default avatarViresh Kumar <viresh.kumar@linaro.org>
Acked-by: default avatarThierry Reding <treding@nvidia.com>
Signed-off-by: default avatarRafael J. Wysocki <rafael.j.wysocki@intel.com>
parent f39d4d5e
......@@ -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[] = {
......@@ -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);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment