Skip to content

Commit 14e7c01

Browse files
bebarinoTzung-Bi Shih
authored andcommitted
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 <[email protected]> Signed-off-by: Stephen Boyd <[email protected]> Acked-by: Prashant Malani <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Tzung-Bi Shih <[email protected]>
1 parent 2b055bf commit 14e7c01

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

drivers/platform/chrome/cros_typec_vdm.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,7 @@ static int cros_typec_port_amode_vdm(struct typec_altmode *amode, const u32 hdr,
142142
sizeof(req), NULL, 0);
143143
}
144144

145-
struct typec_altmode_ops port_amode_ops = {
145+
const struct typec_altmode_ops port_amode_ops = {
146146
.enter = cros_typec_port_amode_enter,
147147
.vdm = cros_typec_port_amode_vdm,
148148
};

drivers/platform/chrome/cros_typec_vdm.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66
#include <linux/usb/typec_altmode.h>
77

8-
extern struct typec_altmode_ops port_amode_ops;
8+
extern const struct typec_altmode_ops port_amode_ops;
99

1010
void cros_typec_handle_vdm_attention(struct cros_typec_data *typec, int port_num);
1111
void cros_typec_handle_vdm_response(struct cros_typec_data *typec, int port_num);

0 commit comments

Comments
 (0)