powercap/intel_rapl: Cleanup duplicated init code
authorThomas Gleixner <tglx@linutronix.de>
Tue, 22 Nov 2016 21:16:02 +0000 (21:16 +0000)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Thu, 24 Nov 2016 20:58:32 +0000 (21:58 +0100)
commit58705069204cc8afa0d7b759e81b61147e973de9
tree73518c297d6adbb72ef1a76ec573a0258fd3577a
parent5e4dc7915979a5a1ca9551659f0fdcd116a25b8f
powercap/intel_rapl: Cleanup duplicated init code

The whole init/exit code is a duplicate of the cpuhotplug code. So we can
just let the hotplug code do the actual work of setting up and tearing down
the domains.

This also restores the package hardware when a package is removed during
hotplug instead of leaving it in the last configured state and only reset
it when the driver is removed.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Tested-by: Jacob Pan <jacob.jun.pan@linux.intel.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
drivers/powercap/intel_rapl.c