diff options
author | Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com> | 2019-03-18 20:14:20 +0100 |
---|---|---|
committer | Jiri Kosina <jkosina@suse.cz> | 2019-03-19 11:57:23 +0100 |
commit | 7ab2184246bd0b32e427ff60bfa07a2435011ce2 (patch) | |
tree | c6a8d86374b53036a2b015ed40969ded26f4c0cd /drivers/hid/intel-ish-hid/ishtp-hid.c | |
parent | HID: intel-ish-hid: Add match callback to ishtp bus type (diff) | |
download | linux-7ab2184246bd0b32e427ff60bfa07a2435011ce2.tar.xz linux-7ab2184246bd0b32e427ff60bfa07a2435011ce2.zip |
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 'drivers/hid/intel-ish-hid/ishtp-hid.c')
-rw-r--r-- | drivers/hid/intel-ish-hid/ishtp-hid.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/hid/intel-ish-hid/ishtp-hid.c b/drivers/hid/intel-ish-hid/ishtp-hid.c index 5c7e127b0483..95a5b87d9105 100644 --- a/drivers/hid/intel-ish-hid/ishtp-hid.c +++ b/drivers/hid/intel-ish-hid/ishtp-hid.c @@ -14,6 +14,7 @@ */ #include <linux/hid.h> +#include <linux/intel-ish-client-if.h> #include <uapi/linux/input.h> #include "ishtp/client.h" #include "ishtp-hid.h" @@ -241,7 +242,8 @@ int ishtp_hid_probe(unsigned int cur_hid_dev, hid->ll_driver = &ishtp_hid_ll_driver; hid->bus = BUS_INTEL_ISHTP; - hid->dev.parent = &client_data->cl_device->dev; + hid->dev.parent = ishtp_device(client_data->cl_device); + hid->version = le16_to_cpu(ISH_HID_VERSION); hid->vendor = le16_to_cpu(client_data->hid_devices[cur_hid_dev].vid); hid->product = le16_to_cpu(client_data->hid_devices[cur_hid_dev].pid); |