Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

ASoC / soc/qcom: Constify APR/GPR callback response

Merge series from Krzysztof Kozlowski <krzysztof.kozlowski@oss.qualcomm.com>:

This constifies the response data used for APR/GPR callbacks.

+25 -25
+3 -3
include/linux/soc/qcom/apr.h
··· 122 122 #define APR_SVC_MAJOR_VERSION(v) ((v >> 16) & 0xFF) 123 123 #define APR_SVC_MINOR_VERSION(v) (v & 0xFF) 124 124 125 - typedef int (*gpr_port_cb) (struct gpr_resp_pkt *d, void *priv, int op); 125 + typedef int (*gpr_port_cb) (const struct gpr_resp_pkt *d, void *priv, int op); 126 126 struct packet_router; 127 127 struct pkt_router_svc { 128 128 struct device *dev; ··· 155 155 int (*probe)(struct apr_device *sl); 156 156 void (*remove)(struct apr_device *sl); 157 157 int (*callback)(struct apr_device *a, 158 - struct apr_resp_pkt *d); 159 - int (*gpr_callback)(struct gpr_resp_pkt *d, void *data, int op); 158 + const struct apr_resp_pkt *d); 159 + gpr_port_cb gpr_callback; 160 160 struct device_driver driver; 161 161 const struct apr_device_id *id_table; 162 162 };
+3 -3
sound/soc/qcom/qdsp6/q6adm.c
··· 186 186 kfree(c); 187 187 } 188 188 189 - static int q6adm_callback(struct apr_device *adev, struct apr_resp_pkt *data) 189 + static int q6adm_callback(struct apr_device *adev, const struct apr_resp_pkt *data) 190 190 { 191 - struct aprv2_ibasic_rsp_result_t *result = data->payload; 191 + const struct aprv2_ibasic_rsp_result_t *result = data->payload; 192 192 int port_idx, copp_idx; 193 - struct apr_hdr *hdr = &data->hdr; 193 + const struct apr_hdr *hdr = &data->hdr; 194 194 struct q6copp *copp; 195 195 struct q6adm *adm = dev_get_drvdata(&adev->dev); 196 196
+3 -3
sound/soc/qcom/qdsp6/q6afe.c
··· 956 956 return ret; 957 957 } 958 958 959 - static int q6afe_callback(struct apr_device *adev, struct apr_resp_pkt *data) 959 + static int q6afe_callback(struct apr_device *adev, const struct apr_resp_pkt *data) 960 960 { 961 961 struct q6afe *afe = dev_get_drvdata(&adev->dev); 962 - struct aprv2_ibasic_rsp_result_t *res; 963 - struct apr_hdr *hdr = &data->hdr; 962 + const struct aprv2_ibasic_rsp_result_t *res; 963 + const struct apr_hdr *hdr = &data->hdr; 964 964 struct q6afe_port *port; 965 965 966 966 if (!data->payload_size)
+5 -5
sound/soc/qcom/qdsp6/q6apm.c
··· 490 490 } 491 491 EXPORT_SYMBOL_GPL(q6apm_get_hw_pointer); 492 492 493 - static int graph_callback(struct gpr_resp_pkt *data, void *priv, int op) 493 + static int graph_callback(const struct gpr_resp_pkt *data, void *priv, int op) 494 494 { 495 495 struct data_cmd_rsp_rd_sh_mem_ep_data_buffer_done_v2 *rd_done; 496 496 struct data_cmd_rsp_wr_sh_mem_ep_data_buffer_done_v2 *done; 497 497 struct apm_cmd_rsp_shared_mem_map_regions *rsp; 498 - struct gpr_ibasic_rsp_result_t *result; 498 + const struct gpr_ibasic_rsp_result_t *result; 499 499 struct q6apm_graph *graph = priv; 500 - struct gpr_hdr *hdr = &data->hdr; 500 + const struct gpr_hdr *hdr = &data->hdr; 501 501 struct device *dev = graph->dev; 502 502 uint32_t client_event; 503 503 phys_addr_t phys; ··· 764 764 765 765 } 766 766 767 - static int apm_callback(struct gpr_resp_pkt *data, void *priv, int op) 767 + static int apm_callback(const struct gpr_resp_pkt *data, void *priv, int op) 768 768 { 769 769 gpr_device_t *gdev = priv; 770 770 struct q6apm *apm = dev_get_drvdata(&gdev->dev); 771 771 struct device *dev = &gdev->dev; 772 772 struct gpr_ibasic_rsp_result_t *result; 773 - struct gpr_hdr *hdr = &data->hdr; 773 + const struct gpr_hdr *hdr = &data->hdr; 774 774 775 775 result = data->payload; 776 776
+5 -5
sound/soc/qcom/qdsp6/q6asm.c
··· 597 597 EXPORT_SYMBOL_GPL(q6asm_get_hw_pointer); 598 598 599 599 static int32_t q6asm_stream_callback(struct apr_device *adev, 600 - struct apr_resp_pkt *data, 600 + const struct apr_resp_pkt *data, 601 601 int session_id) 602 602 { 603 603 struct q6asm *q6asm = dev_get_drvdata(&adev->dev); 604 - struct aprv2_ibasic_rsp_result_t *result; 605 - struct apr_hdr *hdr = &data->hdr; 604 + const struct aprv2_ibasic_rsp_result_t *result; 605 + const struct apr_hdr *hdr = &data->hdr; 606 606 struct audio_port_data *port; 607 607 struct audio_client *ac; 608 608 uint32_t client_event = 0; ··· 742 742 } 743 743 744 744 static int q6asm_srvc_callback(struct apr_device *adev, 745 - struct apr_resp_pkt *data) 745 + const struct apr_resp_pkt *data) 746 746 { 747 747 struct q6asm *q6asm = dev_get_drvdata(&adev->dev); 748 748 struct aprv2_ibasic_rsp_result_t *result; 749 749 struct audio_port_data *port; 750 750 struct audio_client *ac = NULL; 751 - struct apr_hdr *hdr = &data->hdr; 751 + const struct apr_hdr *hdr = &data->hdr; 752 752 struct q6asm *a; 753 753 uint32_t sid = 0; 754 754 uint32_t dir = 0;
+3 -3
sound/soc/qcom/qdsp6/q6core.c
··· 67 67 68 68 static struct q6core *g_core; 69 69 70 - static int q6core_callback(struct apr_device *adev, struct apr_resp_pkt *data) 70 + static int q6core_callback(struct apr_device *adev, const struct apr_resp_pkt *data) 71 71 { 72 72 struct q6core *core = dev_get_drvdata(&adev->dev); 73 - struct aprv2_ibasic_rsp_result_t *result; 74 - struct apr_hdr *hdr = &data->hdr; 73 + const struct aprv2_ibasic_rsp_result_t *result; 74 + const struct apr_hdr *hdr = &data->hdr; 75 75 76 76 result = data->payload; 77 77 switch (hdr->opcode) {
+3 -3
sound/soc/qcom/qdsp6/q6prm.c
··· 175 175 } 176 176 EXPORT_SYMBOL_GPL(q6prm_set_lpass_clock); 177 177 178 - static int prm_callback(struct gpr_resp_pkt *data, void *priv, int op) 178 + static int prm_callback(const struct gpr_resp_pkt *data, void *priv, int op) 179 179 { 180 180 gpr_device_t *gdev = priv; 181 181 struct q6prm *prm = dev_get_drvdata(&gdev->dev); 182 - struct gpr_ibasic_rsp_result_t *result; 183 - struct gpr_hdr *hdr = &data->hdr; 182 + const struct gpr_ibasic_rsp_result_t *result; 183 + const struct gpr_hdr *hdr = &data->hdr; 184 184 185 185 switch (hdr->opcode) { 186 186 case PRM_CMD_RSP_REQUEST_HW_RSC: