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

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
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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)) {
+1 −1
Original line number Diff line number Diff line
@@ -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 {