thermal/drivers/core: Add init section table for self-encapsulation
authorDaniel Lezcano <daniel.lezcano@linaro.org>
Wed, 12 Jun 2019 20:13:24 +0000 (22:13 +0200)
committerZhang Rui <rui.zhang@intel.com>
Thu, 27 Jun 2019 13:22:13 +0000 (21:22 +0800)
commit980af75ede4f36107b98aa5c247359b87c6afc30
treeb89606fef59a940be991d4ddea6c5810cd97c9d3
parent4b972a01a7da614b4796475f933094751a295a2f
thermal/drivers/core: Add init section table for self-encapsulation

Currently the governors are declared in their respective files but they
export their [un]register functions which in turn call the [un]register
governors core's functions. That implies a cyclic dependency which is
not desirable. There is a way to self-encapsulate the governors by letting
them to declare themselves in a __init section table.

Define the table in the asm generic linker description like the other
tables and provide the specific macros to deal with.

Reviewed-by: Amit Kucheria <amit.kucheria@linaro.org>
Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
Signed-off-by: Zhang Rui <rui.zhang@intel.com>
drivers/thermal/thermal_core.h
include/asm-generic/vmlinux.lds.h