usb: typec: Don't prevent using constant typec_mode_desc initializers
In some situations, e.g. when registering alternate modes for local typec ports, it may be handy to use constant mode descriptors. Allow this by changing the mode descriptor arguments of typec_port_register_altmode() et.al. to using const pointers. Signed-off-by: Mats Karrman <mats.dev.list@gmail.com> Reviewed-by: Guenter Roeck <groeck@chromium.org> Acked-by: Heikki Krogerus <heikki.krogerus@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:

committed by
Greg Kroah-Hartman

parent
614536dac7
commit
a86c309e71
@@ -117,13 +117,13 @@ struct typec_altmode_desc {
|
||||
|
||||
struct typec_altmode
|
||||
*typec_partner_register_altmode(struct typec_partner *partner,
|
||||
struct typec_altmode_desc *desc);
|
||||
const struct typec_altmode_desc *desc);
|
||||
struct typec_altmode
|
||||
*typec_plug_register_altmode(struct typec_plug *plug,
|
||||
struct typec_altmode_desc *desc);
|
||||
const struct typec_altmode_desc *desc);
|
||||
struct typec_altmode
|
||||
*typec_port_register_altmode(struct typec_port *port,
|
||||
struct typec_altmode_desc *desc);
|
||||
const struct typec_altmode_desc *desc);
|
||||
void typec_unregister_altmode(struct typec_altmode *altmode);
|
||||
|
||||
struct typec_port *typec_altmode2port(struct typec_altmode *alt);
|
||||
|
Reference in New Issue
Block a user