UPSTREAM: 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. Bug: 150877929 Signed-off-by:Heikki Krogerus <heikki.krogerus@linux.intel.com> Signed-off-by:
Greg Kroah-Hartman <gregkh@linuxfoundation.org> Change-Id: If8dd297875ff88c2c82bdb1d43eb2c72469e9bf0 Signed-off-by:
Will McVicker <willmcvicker@google.com> (cherry picked from commit b0fcdffdd6262d49d509a2945b2c2375a84f28af)
Loading
Please register or sign in to comment