Re: [PATCH V3 1/2] ARM: OMAP3+: use cpu0-cpufreq driver in device tree supported boot

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



* Nishanth Menon <nm@xxxxxx> [130405 15:15]:
> How does the following look?
> Option a) not have a dummy node if CPUFREQ_CPU0 is not configured:
> static inline void omap_init_cpufreq(void)
> {
> 	struct platform_device_info devinfo = { };
> 
> 	if (!of_have_populated_dt())
> 		devinfo.name = "omap-cpufreq";
> 	else if (IS_ENABLED(CONFIG_GENERIC_CPUFREQ_CPU0))
> 		devinfo.name = "cpufreq-cpu0"
> 	
> 	if (devinfo.name)
> 		platform_device_register_full(&devinfo);
> }
> 
> Option b) leave a dummy node registered
> static inline void omap_init_cpufreq(void)
> {
> 	struct platform_device_info devinfo = { };
> 
> 	if (!of_have_populated_dt())
> 		devinfo.name = "omap-cpufreq";
> 	else
> 		devinfo.name = "cpufreq-cpu0"
> 	
> 	platform_device_register_full(&devinfo);
> }
> 
> If there are no objections to (b), I dont mind it either.

To me option (b) looks better as it's if else :)

Tony
--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Arm (vger)]     [ARM Kernel]     [ARM MSM]     [Linux Tegra]     [Linux WPAN Networking]     [Linux Wireless Networking]     [Maemo Users]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite Trails]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux