diff options
author | Sudeep Holla <sudeep.holla@arm.com> | 2019-11-22 14:48:40 +0000 |
---|---|---|
committer | Sudeep Holla <sudeep.holla@arm.com> | 2019-12-24 11:35:49 +0000 |
commit | b55b06b79445574fa031158fe2ae2946cde0d1b7 (patch) | |
tree | d1b5858432993dbfe6d52e549208e35aebd22e75 /drivers/firmware/arm_scmi/power.c | |
parent | 50872a94637b1e7c92b43280adb71dd8e30fd246 (diff) | |
download | linux-b55b06b79445574fa031158fe2ae2946cde0d1b7.tar.bz2 |
firmware: arm_scmi: Stash version in protocol init functions
In order to avoid querying the individual protocol versions multiple
time with more that one device created for each protocol, we can simple
store the copy in the protocol specific private data and use them whenever
required.
Reviewed-by: Cristian Marussi <cristian.marussi@arm.com>
Signed-off-by: Sudeep Holla <sudeep.holla@arm.com>
Diffstat (limited to 'drivers/firmware/arm_scmi/power.c')
-rw-r--r-- | drivers/firmware/arm_scmi/power.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/firmware/arm_scmi/power.c b/drivers/firmware/arm_scmi/power.c index 5abef7079c0a..214886ce84f1 100644 --- a/drivers/firmware/arm_scmi/power.c +++ b/drivers/firmware/arm_scmi/power.c @@ -50,6 +50,7 @@ struct power_dom_info { }; struct scmi_power_info { + u32 version; int num_domains; u64 stats_addr; u32 stats_size; @@ -207,6 +208,7 @@ static int scmi_power_protocol_init(struct scmi_handle *handle) scmi_power_domain_attributes_get(handle, domain, dom); } + pinfo->version = version; handle->power_ops = &power_ops; handle->power_priv = pinfo; |