]> asedeno.scripts.mit.edu Git - linux.git/commit
usb: typec: mux: Take care of driver module reference counting
authorHeikki Krogerus <heikki.krogerus@linux.intel.com>
Wed, 19 Sep 2018 07:58:04 +0000 (10:58 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 20 Sep 2018 11:35:01 +0000 (13:35 +0200)
commit3e3b81965cbfa01fda6d77750feedc3c46fc28d0
tree9a3a56da7e1730bbc93f16b23bdd28a08f356f18
parent16c4cb19fa85c648a803752eb63cac0ef69231c2
usb: typec: mux: Take care of driver module reference counting

Functions typec_mux_get() and typec_switch_get() already
make sure that the mux device reference count is
incremented, but the same must be done to the driver module
as well to prevent the drivers from being unloaded in the
middle of operation.

This fixes a potential "BUG: unable to handle kernel paging
request at ..." from happening.

Fixes: 93dd2112c7b2 ("usb: typec: mux: Get the mux identifier from function parameter")
Acked-by: Hans de Goede <hdegoede@redhat.com>
Tested-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Heikki Krogerus <heikki.krogerus@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/typec/mux.c