cpufreq: cpufreq-cpu0: NULL is a valid regulator

Since NULL could in theory be a valid regulator we ought to check for
IS_ERR() rather than for NULL. In practice this is unlikely to be an
issue but it's better for neatness.

Signed-off-by: Mark Brown <broonie@linaro.org>
Acked-by: Viresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
pxa3xx-cpufreq.c: Avoid using ARRAY_AND_SIZE(e) as a function argument

Replace ARRAY_AND_SIZE(e) in function argument position to avoid
hiding the arity of the called function.

The semantic match that makes this change is as follows:
(http://coccinelle.lip6.fr/)

// <smpl>
@@
expression e,f;
@@

f(...,
- ARRAY_AND_SIZE(e)
+ e,ARRAY_SIZE(e)
  ,...)
// </smpl>

Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>
Acked-by: Viresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
cpufreq / gx: Fix gx_detect_chipset() __init attribute location

__init belongs after the return type on functions, not before it.

Signed-off-by: Hanjun Guo <hanjun.guo@linaro.org>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
cpufreq / pxa2xx: Fix pxa_cpufreq_init_voltages() __init attribute location

__init belongs after the return type on functions, not before it.

Signed-off-by: Hanjun Guo <hanjun.guo@linaro.org>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
cpufreq / s3c24xx: Fix s3c_cpufreq_initclks() __init attribute location

__init belongs after the return type on functions, not before it.

Signed-off-by: Hanjun Guo <hanjun.guo@linaro.org>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
cpufreq: unicore2: Staticize local symbol

This local symbol is used only in this file.
Fix the following sparse warnings:

drivers/cpufreq/unicore2-cpufreq.c:27:5: warning: symbol 'ucv2_verify_speed' was not declared. Should it be static?

Signed-off-by: Jingoo Han <jg1.han@samsung.com>
Acked-by: Viresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Merge branch 'pm-cpufreq-next' into bleeding-edge

* pm-cpufreq-next:
  cpufreq: unicore2: Staticize local symbol
  cpufreq / s3c24xx: Fix s3c_cpufreq_initclks() __init attribute location
  cpufreq / pxa2xx: Fix pxa_cpufreq_init_voltages() __init attribute location
  cpufreq / gx: Fix gx_detect_chipset() __init attribute location
  pxa3xx-cpufreq.c: Avoid using ARRAY_AND_SIZE(e) as a function argument
  cpufreq: cpufreq-cpu0: NULL is a valid regulator
  acpi-cpufreq: Use cpufreq_freq_attr_rw to define the cpb attribute
  cpufreq: fix EXYNOS drivers selection
  cpufreq: exynos5440: Fix to skip when new frequency same as current