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.
Showing the changes to include (1 of 3 files). Show all
Unified · Split
| @@ -146,7 +146,8 @@ struct scmi_perf_proto_ops { · 145 unmodified lines | |||
| 146 | */ | 146 | */ |
| 147 | struct scmi_power_proto_ops { | 147 | struct 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 30 | 151 | #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 | */ |
| 485 | struct scmi_reset_proto_ops { | 486 | struct 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); |