
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>
19 lines
473 B
C
19 lines
473 B
C
/* 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_ */
|