提交 3c41dbde 编写于 作者: G Guenter Roeck 提交者: 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: NGuenter Roeck <linux@roeck-us.net>
Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
上级 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% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册