thermal: intel: hfi: Refactor enabling code into helper functions
authorRicardo Neri <ricardo.neri-calderon@linux.intel.com>
Wed, 3 Jan 2024 04:14:56 +0000 (20:14 -0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 1 Feb 2024 00:19:09 +0000 (16:19 -0800)
commitde791353675fcab27d476482014b9c899e8a36ab
treea952daddabc7e5ca14ae7668b70e2e141379aa64
parent4690558e756c70af2b8a548a30629794fc59bb5e
thermal: intel: hfi: Refactor enabling code into helper functions

[ Upstream commit 8a8b6bb93c704776c4b05cb517c3fa8baffb72f5 ]

In preparation for the addition of a suspend notifier, wrap the logic to
enable HFI and program its memory buffer into helper functions. Both the
CPU hotplug callback and the suspend notifier will use them.

This refactoring does not introduce functional changes.

Signed-off-by: Ricardo Neri <ricardo.neri-calderon@linux.intel.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Stable-dep-of: 97566d09fd02 ("thermal: intel: hfi: Add syscore callbacks for system-wide PM")
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/thermal/intel/intel_hfi.c