diff --git a/drivers/usb/typec/class.c b/drivers/usb/typec/class.c index a1fd1f83fdef..998e98a896e1 100644 --- a/drivers/usb/typec/class.c +++ b/drivers/usb/typec/class.c @@ -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 diff --git a/include/linux/usb/typec.h b/include/linux/usb/typec.h index 88594260074d..34cc102b3862 100644 --- a/include/linux/usb/typec.h +++ b/include/linux/usb/typec.h @@ -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);