On Tue, 26 Mar 2013 10:36:31 +0800
<yuantian.t...@freescale.com> wrote:

> +static int __init ppc_corenet_cpufreq_init(void)
> +{
> +     int ret = 0;
> +     struct device_node  *np;
> +     const struct of_device_id *match;
> +
> +     np = of_find_matching_node(NULL, node_matches);
> +     if (!np)
> +             return -ENODEV;
> +
> +     match = of_match_node(node_matches, np);
> +     freq_data.cpus_per_cluster = (long)match->data;
> +     mutex_init(&freq_data.cpufreq_lock);
> +     of_node_put(np);
> +
> +     ret = cpufreq_register_driver(&ppc_corenet_cpufreq_driver);
> +     if (ret)
> +             return ret;
> +
> +     pr_info("Freescale PowerPC corenet CPU frequency scaling driver\n");
> +
> +     return ret;
> +}
> +
> +static void __exit ppc_corenet_cpufreq_exit(void)
> +{
> +     cpufreq_unregister_driver(&ppc_corenet_cpufreq_driver);
> +}
> +
> +module_init(ppc_corenet_cpufreq_init);
> +module_exit(ppc_corenet_cpufreq_exit);

this needs to be a module_platform_driver.

Kim

_______________________________________________
Linuxppc-dev mailing list
Linuxppc-dev@lists.ozlabs.org
https://lists.ozlabs.org/listinfo/linuxppc-dev

Reply via email to