]> git.baikalelectronics.ru Git - kernel.git/commit
intel_rapl: cleanup some functions
authorZhang Rui <rui.zhang@intel.com>
Wed, 10 Jul 2019 13:44:28 +0000 (21:44 +0800)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Thu, 11 Jul 2019 13:08:57 +0000 (15:08 +0200)
commit420daa32afa69a0f8e213f3e819d2789a01762c7
treedbbb0ece835d52019ccf1a0fec1f34438a7080d0
parentae3b21d0030dff9bb0809a901b43d9a4783aa4a1
intel_rapl: cleanup some functions

Previously, there are three functions:
rapl_register_psys(), which registers platform rapl domain.
rapl_register_powercap(), which registers powercap control type.
rapl_unregsiter_powercap(), which unregisters platform rapl domain and
powercap control type.

This is confusing as the function name does not describe what it does
clearly.

With this patch, the three functions are removed, and two new functions
rapl_register_platform_domain()/rapl_unregister_platform_domain() are
introduced instead, and they do exactly what their function name describes.

Plus, as part of the common code, hardcoded MSR accesses in these functions
are converted to follow the abstracted register access.

Reviewed-by: Pandruvada, Srinivas <srinivas.pandruvada@intel.com>
Tested-by: Pandruvada, Srinivas <srinivas.pandruvada@intel.com>
Signed-off-by: Zhang Rui <rui.zhang@intel.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
drivers/powercap/intel_rapl.c