xhci: dbc: Add a operations structure to access driver functions
authorMathias Nyman <mathias.nyman@linux.intel.com>
Thu, 23 Jul 2020 14:45:28 +0000 (17:45 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 23 Jul 2020 15:05:29 +0000 (17:05 +0200)
commit6ae6470bfa330d0b8892e02888bf5dac2272c28d
tree334242ee5eb63fe82db59b5048172c05d4441062
parent4521f16139409cdf9462c7325d43454462cff6c3
xhci: dbc: Add a operations structure to access driver functions

Don't call dbctty driver functions directly from dbc core code.
Introduce a new dbc_driver structure that contains function pointers
for disconnect and configure operations.

The driver (ttydbc) must provide these opeations when creating a dbc.

Name the structure dbc_driver instead of dbc_ops as we plan to
add more driver configureable values here, such as vid and pid.

Decouples dbc and dbctty.

Signed-off-by: Mathias Nyman <mathias.nyman@linux.intel.com>
Link: https://lore.kernel.org/r/20200723144530.9992-26-mathias.nyman@linux.intel.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/host/xhci-dbgcap.c
drivers/usb/host/xhci-dbgcap.h
drivers/usb/host/xhci-dbgtty.c