Use PACKAGE_VERSION for POWERTOP_VERSION

It was missed to update POWERTOP_VERSION macro so that the
new v2.2 release still shows v2.1 string on the header of
ncurses window.  Convert to use PACKAGE_VERSION macro which
set by autotools to the AC_INIT version so that it cannot
be missed anymore.

Signed-off-by: Namhyung Kim <namhyung@gmail.com>
Allow frequency stats when cpuidle is not enabled

Powertop fails to display frequency stats when cpuidle subsystem
is not enabled. Fix it.

Signed-off-by: Rajagopal Venkat <rajagopal.venkat@linaro.org>
Correct script for tuning wifi power_save with iw

The logic for the script to run to fix the power_save state of a
wireless device was inverted.

Signed-off-by: Daniel Kahn Gillmor <dkg@fifthhorseman.net>
cpufreq: only try to open files under cpuX

There are called many useless 'open' syscalls that always fail, like:
  open("/sys/devices/system/cpu/uevent/cpufreq/scaling_governor", O_RDONLY) = -1 ENOTDIR (Not a directory)
This patch filters them to 'likely' patterns, like e.g.:
/sys/devices/system/cpu/cpuX/cpufreq/scaling_governor, where X is string
starting with digit. For match cases it will add only small overhead.

Originally reported as:
https://bugzilla.redhat.com/show_bug.cgi?id=886185

Signed-off-by: Jaroslav Škarvada <jskarvad@redhat.com>
Merge git://github.com/fenrus75/powertop