summaryrefslogtreecommitdiff
path: root/drivers/staging/typec
diff options
context:
space:
mode:
authorGuenter Roeck <linux@roeck-us.net>2017-08-10 21:15:39 -0700
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2017-08-18 15:57:15 -0700
commit3c41dbde20881959998832b5b9900dfdd6fcb770 (patch)
tree47d347a9b3dc10d7458eb56d2d898f40b258f7a1 /drivers/staging/typec
parente221b2b11bdc3f5b0a42165422335044c472964b (diff)
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>
Diffstat (limited to 'drivers/staging/typec')
-rw-r--r--drivers/staging/typec/tcpm.c2
-rw-r--r--drivers/staging/typec/tcpm.h2
2 files changed, 2 insertions, 2 deletions
diff --git a/drivers/staging/typec/tcpm.c b/drivers/staging/typec/tcpm.c
index 2195c80235a1..bad620fe323a 100644
--- a/drivers/staging/typec/tcpm.c
+++ b/drivers/staging/typec/tcpm.c
@@ -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)) {
diff --git a/drivers/staging/typec/tcpm.h b/drivers/staging/typec/tcpm.h
index 19c307d31a5a..4c6b38cb2c8a 100644
--- a/drivers/staging/typec/tcpm.h
+++ b/drivers/staging/typec/tcpm.h
@@ -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 {