summaryrefslogtreecommitdiffstats
path: root/drivers/firmware/arm_scmi/system.c
diff options
context:
space:
mode:
authorSudeep Holla <sudeep.holla@arm.com>2020-09-07 13:06:01 +0200
committerSudeep Holla <sudeep.holla@arm.com>2020-09-14 08:30:55 +0200
commit1eaf18e35a783a007ef03e09f1dfc3de81eace7c (patch)
tree7c8c04e5415919998d834cc0d3f1aca10304d1da /drivers/firmware/arm_scmi/system.c
parentfirmware: arm_scmi: Move scmi bus init and exit calls into the driver (diff)
downloadlinux-1eaf18e35a783a007ef03e09f1dfc3de81eace7c.tar.xz
linux-1eaf18e35a783a007ef03e09f1dfc3de81eace7c.zip
firmware: arm_scmi: Move scmi protocols registration into the driver
In preparation to enable building SCMI as a single module, let us move the SCMI protocol registration call into the driver. This enables us to also add unregistration of the SCMI protocols. The main reason for this is to keep it simple instead of maintaining it as separate modules and dealing with all possible initcall races and deferred probe handling. We can move it as separate modules if needed in future. Link: https://lore.kernel.org/r/20200907195046.56615-4-sudeep.holla@arm.com Tested-by: Cristian Marussi <cristian.marussi@arm.com> Signed-off-by: Sudeep Holla <sudeep.holla@arm.com>
Diffstat (limited to 'drivers/firmware/arm_scmi/system.c')
-rw-r--r--drivers/firmware/arm_scmi/system.c7
1 files changed, 1 insertions, 6 deletions
diff --git a/drivers/firmware/arm_scmi/system.c b/drivers/firmware/arm_scmi/system.c
index aa1e74f066a0..283e12d5f24b 100644
--- a/drivers/firmware/arm_scmi/system.c
+++ b/drivers/firmware/arm_scmi/system.c
@@ -128,9 +128,4 @@ static int scmi_system_protocol_init(struct scmi_handle *handle)
return 0;
}
-static int __init scmi_system_init(void)
-{
- return scmi_protocol_register(SCMI_PROTOCOL_SYSTEM,
- &scmi_system_protocol_init);
-}
-subsys_initcall(scmi_system_init);
+DEFINE_SCMI_PROTOCOL_REGISTER_UNREGISTER(SCMI_PROTOCOL_SYSTEM, system)