cpufreq: Introduce macros for cpufreq_frequency_table iteration

Many cpufreq drivers need to iterate over the cpufreq_frequency_table
for various tasks.

This patch introduces two macros which can be used for iteration over
cpufreq_frequency_table keeping a common coding style across drivers:

- cpufreq_for_each_entry: iterate over each entry of the table
- cpufreq_for_each_valid_entry: iterate over each entry that contains
a valid frequency.

It should have no functional changes.

Signed-off-by: Stratos Karafotis <stratosk@semaphore.gr>
Acked-by: Lad, Prabhakar <prabhakar.csengg@gmail.com>
Acked-by: Viresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
cpufreq: Use cpufreq_for_each_* macros for frequency table iteration

The cpufreq core now supports the cpufreq_for_each_entry and
cpufreq_for_each_valid_entry macros helpers for iteration over the
cpufreq_frequency_table, so use them.

It should have no functional changes.

Signed-off-by: Stratos Karafotis <stratosk@semaphore.gr>
Acked-by: Lad, Prabhakar <prabhakar.csengg@gmail.com>
Acked-by: Viresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
ARM: davinci: da850: Use cpufreq_for_each_entry macro for iteration

The cpufreq core now supports the cpufreq_for_each_entry macro helper
for iteration over the cpufreq_frequency_table, so use it.

It should have no functional changes.

Signed-off-by: Stratos Karafotis <stratosk@semaphore.gr>
Acked-and-tested-by: Lad, Prabhakar <prabhakar.csengg@gmail.com>
Acked-by: Viresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
mfd: db8500-prcmu: Use cpufreq_for_each_entry macro for iteration

The cpufreq core now supports the cpufreq_for_each_entry macro helper
for iteration over the cpufreq_frequency_table, so use it.

It should have no functional changes.

Signed-off-by: Stratos Karafotis <stratosk@semaphore.gr>
Acked-by: Viresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
mips: lemote 2f: Use cpufreq_for_each_entry macro for iteration

The cpufreq core now supports the cpufreq_for_each_entry macro helper
for iteration over the cpufreq_frequency_table, so use it.

It should have no functional changes.

Signed-off-by: Stratos Karafotis <stratosk@semaphore.gr>
Acked-by: Viresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
thermal: cpu_cooling: Use cpufreq_for_each_valid_entry macro for iteration

The cpufreq core now supports the cpufreq_for_each_valid_entry macro
helper for iteration over the cpufreq_frequency_table, so use it.

Also remove the redundant !! operator.

It should have no functional changes.

Signed-off-by: Stratos Karafotis <stratosk@semaphore.gr>
Acked-by: Viresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
irda: sh_sir: Use cpufreq_for_each_valid_entry macro for iteration

The cpufreq core supports the cpufreq_for_each_valid_entry macro
helper for iteration over the cpufreq_frequency_table, so use it.

It should have no functional changes.

Signed-off-by: Stratos Karafotis <stratosk@semaphore.gr>
Acked-by: Viresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
sh: clk: Use cpufreq_for_each_valid_entry macro for iteration

The cpufreq core now supports the cpufreq_for_each_valid_entry macro
helper for iteration over the cpufreq_frequency_table, so use it.

It should have no functional changes.

Signed-off-by: Stratos Karafotis <stratosk@semaphore.gr>
Acked-by: Viresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Merge branch 'cpufreq-macros' into bleeding-edge

* cpufreq-macros:
  sh: clk: Use cpufreq_for_each_valid_entry macro for iteration
  irda: sh_sir: Use cpufreq_for_each_valid_entry macro for iteration
  thermal: cpu_cooling: Use cpufreq_for_each_valid_entry macro for iteration
  mips: lemote 2f: Use cpufreq_for_each_entry macro for iteration
  mfd: db8500-prcmu: Use cpufreq_for_each_entry macro for iteration
  ARM: davinci: da850: Use cpufreq_for_each_entry macro for iteration
  cpufreq: Use cpufreq_for_each_* macros for frequency table iteration
  cpufreq: Introduce macros for cpufreq_frequency_table iteration
Merge branch 'i2c-acpi' into bleeding-edge

* i2c-acpi:
  I2C / ACPI: Add CONFIG_I2C_ACPI config
  I2C / ACPI: Move ACPI related code to i2c-acpi.c
  I2C / ACPI: Add i2c ACPI operation region support
  I2C: Add smbus word/block process call helper function
  I2C: Add smbus quick read/write helper function
  ACPI/Thermal: Use acpi_bus_attach_private_data() to attach private data
  ACPI: Add acpi_bus_attach_private_data() to facilitate to attach data to ACPI handle
  ACPICA: Export acpi_buffer_to_resource symbol