Skip to content
Commit b0fcdffd authored by Heikki Krogerus's avatar Heikki Krogerus Committed by Greg Kroah-Hartman
Browse files

usb: typec: Prepare alt mode enter/exit reporting for UCSI alt mode support



Because of UCSI, we have to support alt mode enter/exit
reporting even when there is no alt mode driver bind to the
alt mode device. With UCSI a firmware handles the alternate
modes, and the modes are entered automatically from OS PoW.

Changing typec_altmode_update_active() so that the driver
module ref count is incremented/decremented only if there
really is a driver for the alt mode. That avoids a NULL
pointer dereference from happening when the driver is
missing.

Signed-off-by: default avatarHeikki Krogerus <heikki.krogerus@linux.intel.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 382e8fa8
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment