diff options
author | Stephen Boyd <swboyd@chromium.org> | 2023-10-02 17:34:27 -0700 |
---|---|---|
committer | Tzung-Bi Shih <tzungbi@kernel.org> | 2023-10-04 11:40:54 +0800 |
commit | 14e7c01cc3494b75c3ff1d099a2f5f76b1fcb01d (patch) | |
tree | 5b1c28bbf47d9754e148454eebab09a4f8f9f7be /drivers/platform/chrome | |
parent | 2b055bf8ac8492111a62177764e54e0d2614c6b8 (diff) | |
download | lwn-14e7c01cc3494b75c3ff1d099a2f5f76b1fcb01d.tar.gz lwn-14e7c01cc3494b75c3ff1d099a2f5f76b1fcb01d.zip |
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>
Diffstat (limited to 'drivers/platform/chrome')
-rw-r--r-- | drivers/platform/chrome/cros_typec_vdm.c | 2 | ||||
-rw-r--r-- | drivers/platform/chrome/cros_typec_vdm.h | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/drivers/platform/chrome/cros_typec_vdm.c b/drivers/platform/chrome/cros_typec_vdm.c index 20515ee0a20e..3f632fd35000 100644 --- a/drivers/platform/chrome/cros_typec_vdm.c +++ b/drivers/platform/chrome/cros_typec_vdm.c @@ -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, }; diff --git a/drivers/platform/chrome/cros_typec_vdm.h b/drivers/platform/chrome/cros_typec_vdm.h index 95a6a75d32b6..631bd2ce4b00 100644 --- a/drivers/platform/chrome/cros_typec_vdm.h +++ b/drivers/platform/chrome/cros_typec_vdm.h @@ -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); |