]> git.baikalelectronics.ru Git - kernel.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)
commit94af1f736b6d0d424e548c2ce53837502beddfff
tree9a3a56da7e1730bbc93f16b23bdd28a08f356f18
parenta920e1f23e0a89d85e0a4acf0b4573cbbbc88806
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: 7a7cc4e10894 ("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