]> git.baikalelectronics.ru Git - kernel.git/commit
[CPUFREQ] pcc-cpufreq: don't load driver if get_freq fails during init.
authorNaga Chumbalkar <nagananda.chumbalkar@hp.com>
Wed, 9 Mar 2011 14:02:49 +0000 (14:02 +0000)
committerDave Jones <davej@redhat.com>
Wed, 9 Mar 2011 17:33:15 +0000 (12:33 -0500)
commit675a78bec61d398e02abce339edb71427dca9e45
tree8d9d0306d0cc275e72b9fa34101f844e5a573ebe
parent80e7c449e8b9ba334a4a21064a0b0281b9f62f70
[CPUFREQ] pcc-cpufreq: don't load driver if get_freq fails during init.

Return 0 on failure. This will cause the initialization of the driver
to fail and prevent the driver from loading if the BIOS cannot handle
the PCC interface command to "get frequency". Otherwise, the driver
will load and display a very high value like "4294967274" (which is
actually -EINVAL) for frequency:

# cat /sys/devices/system/cpu/cpu0/cpufreq/cpuinfo_cur_freq
4294967274

Signed-off-by: Naga Chumbalkar <nagananda.chumbalkar@hp.com>
CC: stable@kernel.org
Signed-off-by: Dave Jones <davej@redhat.com>
arch/x86/kernel/cpu/cpufreq/pcc-cpufreq.c