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]>
#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[] = {
{
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);