Commit 14e7c01c authored by Stephen Boyd's avatar Stephen Boyd Committed by Tzung-Bi Shih
Browse files

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: default avatarStephen Boyd <swboyd@chromium.org>
Acked-by: default avatarPrashant Malani <pmalani@chromium.org>
Link: https://lore.kernel.org/r/20231003003429.1378109-4-swboyd@chromium.org


Signed-off-by: default avatarTzung-Bi Shih <tzungbi@kernel.org>
parent 2b055bf8
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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
Original line number Diff line number Diff line
@@ -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);