diff options
author | Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com> | 2019-03-18 22:14:20 +0300 |
---|---|---|
committer | Jiri Kosina <jkosina@suse.cz> | 2019-03-19 13:57:23 +0300 |
commit | 7ab2184246bd0b32e427ff60bfa07a2435011ce2 (patch) | |
tree | c6a8d86374b53036a2b015ed40969ded26f4c0cd /include/linux/intel-ish-client-if.h | |
parent | 6b3f75f75fdd225f8c5927b938c29bd24c21fc1b (diff) | |
download | linux-7ab2184246bd0b32e427ff60bfa07a2435011ce2.tar.xz |
HID: intel-ish-hid: Hide members of struct ishtp_cl_device
ISH clients don't need to access any field of struct ishtp_cl_device. To
avoid this create an interface functions instead where it is required.
In the case of ishtp_cl_allocate(), modify the parameters so that the
clients don't have to dereference.
Clients can also use tracing, here a new interface is added to get the
common trace function pointer, instead of direct call.
The new interface functions defined in one external header file, named
intel-ish-client-if.h. This is the only header files all ISHTP clients
must include.
Signed-off-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
Diffstat (limited to 'include/linux/intel-ish-client-if.h')
-rw-r--r-- | include/linux/intel-ish-client-if.h | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/include/linux/intel-ish-client-if.h b/include/linux/intel-ish-client-if.h new file mode 100644 index 000000000000..11e285172735 --- /dev/null +++ b/include/linux/intel-ish-client-if.h @@ -0,0 +1,18 @@ +/* SPDX-License-Identifier: GPL-2.0 */ +/* + * Intel ISH client Interface definitions + * + * Copyright (c) 2019, Intel Corporation. + */ + +#ifndef _INTEL_ISH_CLIENT_IF_H_ +#define _INTEL_ISH_CLIENT_IF_H_ + +struct ishtp_cl_device; + +/* Get the device * from ishtp device instance */ +struct device *ishtp_device(struct ishtp_cl_device *cl_device); +/* Trace interface for clients */ +void *ishtp_trace_callback(struct ishtp_cl_device *cl_device); + +#endif /* _INTEL_ISH_CLIENT_IF_H_ */ |