Commit b5094a3b authored by Rikard Falkeborn's avatar Rikard Falkeborn Committed by Jakub Kicinski

soc: qcom: ipa: Constify static qmi structs

These 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>
Acked-by: default avatarAlex Elder <elder@linaro.org>
Link: https://lore.kernel.org/r/20201122234031.33432-2-rikard.falkeborn@gmail.comSigned-off-by: default avatarJakub Kicinski <kuba@kernel.org>
parent fd897679
...@@ -168,7 +168,7 @@ static void ipa_server_bye(struct qmi_handle *qmi, unsigned int node) ...@@ -168,7 +168,7 @@ static void ipa_server_bye(struct qmi_handle *qmi, unsigned int node)
ipa_qmi->indication_sent = false; ipa_qmi->indication_sent = false;
} }
static struct qmi_ops ipa_server_ops = { static const struct qmi_ops ipa_server_ops = {
.bye = ipa_server_bye, .bye = ipa_server_bye,
}; };
...@@ -234,7 +234,7 @@ static void ipa_server_driver_init_complete(struct qmi_handle *qmi, ...@@ -234,7 +234,7 @@ static void ipa_server_driver_init_complete(struct qmi_handle *qmi,
} }
/* The server handles two request message types sent by the modem. */ /* The server handles two request message types sent by the modem. */
static struct qmi_msg_handler ipa_server_msg_handlers[] = { static const struct qmi_msg_handler ipa_server_msg_handlers[] = {
{ {
.type = QMI_REQUEST, .type = QMI_REQUEST,
.msg_id = IPA_QMI_INDICATION_REGISTER, .msg_id = IPA_QMI_INDICATION_REGISTER,
...@@ -261,7 +261,7 @@ static void ipa_client_init_driver(struct qmi_handle *qmi, ...@@ -261,7 +261,7 @@ static void ipa_client_init_driver(struct qmi_handle *qmi,
} }
/* The client handles one response message type sent by the modem. */ /* The client handles one response message type sent by the modem. */
static struct qmi_msg_handler ipa_client_msg_handlers[] = { static const struct qmi_msg_handler ipa_client_msg_handlers[] = {
{ {
.type = QMI_RESPONSE, .type = QMI_RESPONSE,
.msg_id = IPA_QMI_INIT_DRIVER, .msg_id = IPA_QMI_INIT_DRIVER,
...@@ -463,7 +463,7 @@ ipa_client_new_server(struct qmi_handle *qmi, struct qmi_service *svc) ...@@ -463,7 +463,7 @@ ipa_client_new_server(struct qmi_handle *qmi, struct qmi_service *svc)
return 0; return 0;
} }
static struct qmi_ops ipa_client_ops = { static const struct qmi_ops ipa_client_ops = {
.new_server = ipa_client_new_server, .new_server = ipa_client_new_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