Commit ad37a46e authored by Rikard Falkeborn's avatar Rikard Falkeborn Committed by Kalle Valo

ath10k: Constify static qmi structs

qmi_msg_handler[] and ath10k_qmi_ops are only used as input arguments
to qmi_handle_init() which accepts const pointers to both qmi_ops and
qmi_msg_handler. Make them const to allow the compiler to put them in
read-only memory.
Signed-off-by: default avatarRikard Falkeborn <rikard.falkeborn@gmail.com>
Signed-off-by: default avatarKalle Valo <kvalo@codeaurora.org>
Link: https://lore.kernel.org/r/20201122234031.33432-3-rikard.falkeborn@gmail.com
parent 6364e693
...@@ -917,7 +917,7 @@ static void ath10k_qmi_msa_ready_ind(struct qmi_handle *qmi_hdl, ...@@ -917,7 +917,7 @@ static void ath10k_qmi_msa_ready_ind(struct qmi_handle *qmi_hdl,
ath10k_qmi_driver_event_post(qmi, ATH10K_QMI_EVENT_MSA_READY_IND, NULL); ath10k_qmi_driver_event_post(qmi, ATH10K_QMI_EVENT_MSA_READY_IND, NULL);
} }
static struct qmi_msg_handler qmi_msg_handler[] = { static const struct qmi_msg_handler qmi_msg_handler[] = {
{ {
.type = QMI_INDICATION, .type = QMI_INDICATION,
.msg_id = QMI_WLFW_FW_READY_IND_V01, .msg_id = QMI_WLFW_FW_READY_IND_V01,
...@@ -981,7 +981,7 @@ static void ath10k_qmi_del_server(struct qmi_handle *qmi_hdl, ...@@ -981,7 +981,7 @@ static void ath10k_qmi_del_server(struct qmi_handle *qmi_hdl,
NULL); NULL);
} }
static struct qmi_ops ath10k_qmi_ops = { static const struct qmi_ops ath10k_qmi_ops = {
.new_server = ath10k_qmi_new_server, .new_server = ath10k_qmi_new_server,
.del_server = ath10k_qmi_del_server, .del_server = ath10k_qmi_del_server,
}; };
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment