diff options
author | Cristian Marussi <cristian.marussi@arm.com> | 2022-03-30 18:05:35 +0300 |
---|---|---|
committer | Sudeep Holla <sudeep.holla@arm.com> | 2022-04-28 20:22:51 +0300 |
commit | 992be5d3c818fcc277db246cb409659ca82abdbe (patch) | |
tree | f4459db85f8b6fbb1796b00a5f9c91006bd083a8 /drivers/firmware/arm_scmi | |
parent | 776b6c8a25a36b5f46ed182ed6514c208e76720d (diff) | |
download | linux-992be5d3c818fcc277db246cb409659ca82abdbe.tar.xz |
firmware: arm_scmi: Make name_get operations return a const
A few protocol operations are available that returns a pointer to an
internal character array representing resource name. Make those functions
return a const pointer to such array.
Link: https://lore.kernel.org/r/20220330150551.2573938-7-cristian.marussi@arm.com
Signed-off-by: Cristian Marussi <cristian.marussi@arm.com>
Signed-off-by: Sudeep Holla <sudeep.holla@arm.com>
Diffstat (limited to 'drivers/firmware/arm_scmi')
-rw-r--r-- | drivers/firmware/arm_scmi/power.c | 5 | ||||
-rw-r--r-- | drivers/firmware/arm_scmi/reset.c | 4 |
2 files changed, 5 insertions, 4 deletions
diff --git a/drivers/firmware/arm_scmi/power.c b/drivers/firmware/arm_scmi/power.c index 0f0b94f0b624..5c04d63e7ff1 100644 --- a/drivers/firmware/arm_scmi/power.c +++ b/drivers/firmware/arm_scmi/power.c @@ -174,8 +174,9 @@ static int scmi_power_num_domains_get(const struct scmi_protocol_handle *ph) return pi->num_domains; } -static char *scmi_power_name_get(const struct scmi_protocol_handle *ph, - u32 domain) +static const char * +scmi_power_name_get(const struct scmi_protocol_handle *ph, + u32 domain) { struct scmi_power_info *pi = ph->get_priv(ph); struct power_dom_info *dom = pi->dom_info + domain; diff --git a/drivers/firmware/arm_scmi/reset.c b/drivers/firmware/arm_scmi/reset.c index 9cdbd133db10..b823a9f64af9 100644 --- a/drivers/firmware/arm_scmi/reset.c +++ b/drivers/firmware/arm_scmi/reset.c @@ -126,8 +126,8 @@ static int scmi_reset_num_domains_get(const struct scmi_protocol_handle *ph) return pi->num_domains; } -static char *scmi_reset_name_get(const struct scmi_protocol_handle *ph, - u32 domain) +static const char * +scmi_reset_name_get(const struct scmi_protocol_handle *ph, u32 domain) { struct scmi_reset_info *pi = ph->get_priv(ph); |