From: Viresh Kumar Date: Mon, 16 Sep 2013 13:26:03 +0000 (+0530) Subject: cpufreq: Add new helper cpufreq_table_validate_and_show() X-Git-Tag: v3.13-rc1~96^2~12^2~4^2~159 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=27047a603645d0885bcd72d7a0b6cce6e3c94ca7;p=pandora-kernel.git cpufreq: Add new helper cpufreq_table_validate_and_show() Almost every cpufreq driver is required to validate its frequency table with: cpufreq_frequency_table_cpuinfo() and then expose it to cpufreq core with: cpufreq_frequency_table_get_attr(). This patch creates another helper routine cpufreq_table_validate_and_show() that will do both these steps in a single call and will return 0 for success, error otherwise. This also fixes potential bugs in cpufreq drivers where people have called cpufreq_frequency_table_get_attr() before calling cpufreq_frequency_table_cpuinfo(), as the later may fail. Signed-off-by: Viresh Kumar Signed-off-by: Rafael J. Wysocki --- Reading git-diff-tree failed