Revert "Deletion of unnecessary checks before specific function calls"

Accidentally committed two patches under the same commit message.  Both
patches will be added immediately after.

This reverts commit fb6f65a01eca950e2e12a87492268e7d2105aa0b.
Deletion of unnecessary checks before calls of the function "free"

The function "free" is documented in the way that no action shall occur for
a passed null pointer. It is therefore not needed that a function caller
repeats a corresponding check.
http://stackoverflow.com/questions/18775608/free-a-null-pointer-anyway-or-check-first

Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
Removal of unnecessary checks before a few calls of the C++ delete operator

The C++ delete operator can also handle passed null pointers on its own
without unexpected side effects.
http://www.parashift.com/c++-faq/delete-handles-null.html

It is therefore not needed to keep additional safety checks directly before
such function calls.

Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
bug-fix: power estimates

PowerTOP didn’t have a way to inform the user how many runs were needed
to show power estimates when testing battery power. This patch fixes
that problem.  PowerTOP uses a fitness function to approximate the power
estimates, hence the need to have many runs.  The more runs the more
precise the measurements.  For extra precise power measurements use
RAPLE and Power Cap support on Linux kernel.  These features were
released on Linux 3.13.  Latest kernel distributions have RAPLE and
Power Cap enabled.

Signed-off-by: Alexandra Yates <alexandra.yates@linux.intel.com>
Addition of two include guards

Unique include guards were added to two header files to make their reuse
a bit safer.
https://www.securecoding.cert.org/confluence/display/cplusplus/PRE06-CPP.+Enclose+header+files+in+an+inclusion+guard

Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
Remove repeated nr_open assignment

The nr_open variable is already initialized to NR_OPEN_DEF.  This patch
removes the redundant checking and assignment for nr_open.

Initialy submited by  Salman Ahmed <salman0yam@gmail.com> However, I
could not get any of his patches appled.

Signed-off-by: Alexandra Yates <alexandra.yates@linux.intel.com>
bug-fix: Powertop filtered devices

PowerTOP used to show only the devices that had runtime power management
enabled.  This patch allows users to see all PCI and I2C devices on the
system.

Signed-off-by: Alexandra Yates <alexandra.yates@linux.intel.com>