platform/chrome: cros_typec_vdm: Mark port_amode_ops const

Mark this struct of functions const so it moves to RO memory.

Cc: Prashant Malani <pmalani@chromium.org>
Signed-off-by: Stephen Boyd <swboyd@chromium.org>
Acked-by: Prashant Malani <pmalani@chromium.org>
Link: https://lore.kernel.org/r/20231003003429.1378109-4-swboyd@chromium.org
Signed-off-by: Tzung-Bi Shih <tzungbi@kernel.org>
This commit is contained in:
Stephen Boyd
2023-10-02 17:34:27 -07:00
committed by Tzung-Bi Shih
parent 2b055bf8ac
commit 14e7c01cc3
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -142,7 +142,7 @@ static int cros_typec_port_amode_vdm(struct typec_altmode *amode, const u32 hdr,
sizeof(req), NULL, 0);
}
struct typec_altmode_ops port_amode_ops = {
const struct typec_altmode_ops port_amode_ops = {
.enter = cros_typec_port_amode_enter,
.vdm = cros_typec_port_amode_vdm,
};
+1 -1
View File
@@ -5,7 +5,7 @@
#include <linux/usb/typec_altmode.h>
extern struct typec_altmode_ops port_amode_ops;
extern const struct typec_altmode_ops port_amode_ops;
void cros_typec_handle_vdm_attention(struct cros_typec_data *typec, int port_num);
void cros_typec_handle_vdm_response(struct cros_typec_data *typec, int port_num);