History

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.

Cristian Marussi committed 4 years ago

Commit 992be5d1 parent 776b6c83 files · +9 −6Browse files

Showing the changes to include (1 of 3 files). Show all

Unified · Split

include/linux/scmi_protocol.h+4−2
@@ -146,7 +146,8 @@ struct scmi_perf_proto_ops { · 145 unmodified lines
146 */146 */
147struct scmi_power_proto_ops {147struct scmi_power_proto_ops {
148 int (*num_domains_get)(const struct scmi_protocol_handle *ph);148 int (*num_domains_get)(const struct scmi_protocol_handle *ph);
149 char *(*name_get)(const struct scmi_protocol_handle *ph, u32 domain);149 const char *(*name_get)(const struct scmi_protocol_handle *ph,
150 u32 domain);
150#define SCMI_POWER_STATE_TYPE_SHIFT 30151#define SCMI_POWER_STATE_TYPE_SHIFT 30
151#define SCMI_POWER_STATE_ID_MASK (BIT(28) - 1)152#define SCMI_POWER_STATE_ID_MASK (BIT(28) - 1)
152#define SCMI_POWER_STATE_PARAM(type, id) \153#define SCMI_POWER_STATE_PARAM(type, id) \
@@ -484,7 +485,8 @@ struct scmi_sensor_proto_ops { · 331 unmodified lines
484 */485 */
485struct scmi_reset_proto_ops {486struct scmi_reset_proto_ops {
486 int (*num_domains_get)(const struct scmi_protocol_handle *ph);487 int (*num_domains_get)(const struct scmi_protocol_handle *ph);
487 char *(*name_get)(const struct scmi_protocol_handle *ph, u32 domain);488 const char *(*name_get)(const struct scmi_protocol_handle *ph,
489 u32 domain);
488 int (*latency_get)(const struct scmi_protocol_handle *ph, u32 domain);490 int (*latency_get)(const struct scmi_protocol_handle *ph, u32 domain);
489 int (*reset)(const struct scmi_protocol_handle *ph, u32 domain);491 int (*reset)(const struct scmi_protocol_handle *ph, u32 domain);
490 int (*assert)(const struct scmi_protocol_handle *ph, u32 domain);492 int (*assert)(const struct scmi_protocol_handle *ph, u32 domain);