usb: typec: typec_port_register_altmodes() depends on CONFIG_NO_GKI

Signed-off-by: Tao Huang <huangtao@rock-chips.com>
Change-Id: I030231375933eabe85c2c15cc6e9bd96748fa934
This commit is contained in:
Tao Huang
2021-09-03 18:18:15 +08:00
parent 9cf9c33b76
commit afaeb74a36
2 changed files with 10 additions and 0 deletions
+2
View File
@@ -1983,6 +1983,7 @@ typec_port_register_altmode(struct typec_port *port,
}
EXPORT_SYMBOL_GPL(typec_port_register_altmode);
#ifdef CONFIG_NO_GKI
void typec_port_register_altmodes(struct typec_port *port,
const struct typec_altmode_ops *ops, void *drvdata,
struct typec_altmode **altmodes, size_t n)
@@ -2036,6 +2037,7 @@ void typec_port_register_altmodes(struct typec_port *port,
}
}
EXPORT_SYMBOL_GPL(typec_port_register_altmodes);
#endif /* CONFIG_NO_GKI */
/**
* typec_register_port - Register a USB Type-C Port
+8
View File
@@ -141,9 +141,17 @@ struct typec_altmode
*typec_port_register_altmode(struct typec_port *port,
const struct typec_altmode_desc *desc);
#ifdef CONFIG_NO_GKI
void typec_port_register_altmodes(struct typec_port *port,
const struct typec_altmode_ops *ops, void *drvdata,
struct typec_altmode **altmodes, size_t n);
#else
static inline void typec_port_register_altmodes(struct typec_port *port,
const struct typec_altmode_ops *ops, void *drvdata,
struct typec_altmode **altmodes, size_t n)
{
}
#endif
void typec_unregister_altmode(struct typec_altmode *altmode);