diff options
author | Rajmohan Mani <rajmohan.mani@intel.com> | 2019-12-17 13:33:42 +0100 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2019-12-18 15:40:36 +0100 |
commit | aa43a9dcf7fcb71f34689bc63cdfb3464d2bebbb (patch) | |
tree | e956b031cb32e116b09c7443a8f1a89a570c95b6 /drivers/thunderbolt/cap.c | |
parent | thunderbolt: Update Kconfig entries to USB4 (diff) | |
download | linux-aa43a9dcf7fcb71f34689bc63cdfb3464d2bebbb.tar.xz linux-aa43a9dcf7fcb71f34689bc63cdfb3464d2bebbb.zip |
thunderbolt: Make tb_switch_find_cap() available to other files
We need to find switch capabilities in order to implement TMU support so
make it available to other files as well.
Signed-off-by: Rajmohan Mani <rajmohan.mani@intel.com>
Signed-off-by: Mika Westerberg <mika.westerberg@linux.intel.com>
Link: https://lore.kernel.org/r/20191217123345.31850-7-mika.westerberg@linux.intel.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/thunderbolt/cap.c')
-rw-r--r-- | drivers/thunderbolt/cap.c | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/drivers/thunderbolt/cap.c b/drivers/thunderbolt/cap.c index fdd77bb4628d..19db6cdc5b70 100644 --- a/drivers/thunderbolt/cap.c +++ b/drivers/thunderbolt/cap.c @@ -113,7 +113,16 @@ int tb_port_find_cap(struct tb_port *port, enum tb_port_cap cap) return ret; } -static int tb_switch_find_cap(struct tb_switch *sw, enum tb_switch_cap cap) +/** + * tb_switch_find_cap() - Find switch capability + * @sw Switch to find the capability for + * @cap: Capability to look + * + * Returns offset to start of capability or %-ENOENT if no such + * capability was found. Negative errno is returned if there was an + * error. + */ +int tb_switch_find_cap(struct tb_switch *sw, enum tb_switch_cap cap) { int offset = sw->config.first_cap_offset; |