Commit 3c41dbde authored by Guenter Roeck's avatar Guenter Roeck Committed by Greg Kroah-Hartman

staging: typec: tcpm: Constify alternate modes

Constify alternate mode configuration data which won't be touched
by the driver.
Signed-off-by: default avatarGuenter Roeck <linux@roeck-us.net>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent e221b2b1
......@@ -3484,7 +3484,7 @@ struct tcpm_port *tcpm_register_port(struct device *dev, struct tcpc_dev *tcpc)
}
if (tcpc->config->alt_modes) {
struct typec_altmode_desc *paltmode = tcpc->config->alt_modes;
const struct typec_altmode_desc *paltmode = tcpc->config->alt_modes;
i = 0;
while (paltmode->svid && i < ARRAY_SIZE(port->port_altmode)) {
......
......@@ -72,7 +72,7 @@ struct tcpc_config {
enum typec_role default_role;
bool try_role_hw; /* try.{src,snk} implemented in hardware */
struct typec_altmode_desc *alt_modes;
const struct typec_altmode_desc *alt_modes;
};
enum tcpc_usb_switch {
......
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