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:
committed by
Greg Kroah-Hartman
parent
e221b2b11b
commit
3c41dbde20
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user