staging: typec: tcpm: Constify alternate modes

Constify alternate mode configuration data which won't be touched
by the driver.

Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
Guenter Roeck
2017-08-10 21:15:39 -07:00
committed by Greg Kroah-Hartman
parent e221b2b11b
commit 3c41dbde20
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -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
View File
@@ -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 {