diff options
Diffstat (limited to 'drivers/usb/typec/class.c')
-rw-r--r-- | drivers/usb/typec/class.c | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/drivers/usb/typec/class.c b/drivers/usb/typec/class.c index bf97c31d0bba..2a33ff159d04 100644 --- a/drivers/usb/typec/class.c +++ b/drivers/usb/typec/class.c @@ -1510,11 +1510,9 @@ int typec_set_orientation(struct typec_port *port, { int ret; - if (port->sw) { - ret = port->sw->set(port->sw, orientation); - if (ret) - return ret; - } + ret = typec_switch_set(port->sw, orientation); + if (ret) + return ret; port->orientation = orientation; sysfs_notify(&port->dev.kobj, NULL, "orientation"); @@ -1550,7 +1548,7 @@ int typec_set_mode(struct typec_port *port, int mode) state.mode = mode; - return port->mux ? port->mux->set(port->mux, &state) : 0; + return typec_mux_set(port->mux, &state); } EXPORT_SYMBOL_GPL(typec_set_mode); |