diff options
author | Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com> | 2019-03-18 15:14:28 -0400 |
---|---|---|
committer | Jiri Kosina <jkosina@suse.cz> | 2019-03-19 06:57:24 -0400 |
commit | 0e568a16af403263f8e421f1f10b91f9f15b52c3 (patch) | |
tree | be788ed1972401dbcf935a498a75e5251e9f8d16 | |
parent | 29b06d12ba796a4c3e7bdfd8a26230eefb261261 (diff) |
HID: intel-ish-hid: Add interface function for PCI device pointer
Instead of directly accessing PCI device poitner via struct ishtp_cl,
create interface function for same. This is required for DMA transfer.
Signed-off-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
-rw-r--r-- | drivers/hid/intel-ish-hid/ishtp/bus.c | 13 | ||||
-rw-r--r-- | include/linux/intel-ish-client-if.h | 2 |
2 files changed, 15 insertions, 0 deletions
diff --git a/drivers/hid/intel-ish-hid/ishtp/bus.c b/drivers/hid/intel-ish-hid/ishtp/bus.c index 66a485a41481..fb8ca12955b4 100644 --- a/drivers/hid/intel-ish-hid/ishtp/bus.c +++ b/drivers/hid/intel-ish-hid/ishtp/bus.c | |||
@@ -856,6 +856,19 @@ struct device *ishtp_device(struct ishtp_cl_device *device) | |||
856 | EXPORT_SYMBOL(ishtp_device); | 856 | EXPORT_SYMBOL(ishtp_device); |
857 | 857 | ||
858 | /** | 858 | /** |
859 | * ishtp_get_pci_device() - Return PCI device dev pointer | ||
860 | * This interface is used to return PCI device pointer | ||
861 | * from ishtp_cl_device instance. | ||
862 | * | ||
863 | * Return: device *. | ||
864 | */ | ||
865 | struct device *ishtp_get_pci_device(struct ishtp_cl_device *device) | ||
866 | { | ||
867 | return device->ishtp_dev->devc; | ||
868 | } | ||
869 | EXPORT_SYMBOL(ishtp_get_pci_device); | ||
870 | |||
871 | /** | ||
859 | * ishtp_trace_callback() - Return trace callback | 872 | * ishtp_trace_callback() - Return trace callback |
860 | * | 873 | * |
861 | * This interface is used to return trace callback function pointer. | 874 | * This interface is used to return trace callback function pointer. |
diff --git a/include/linux/intel-ish-client-if.h b/include/linux/intel-ish-client-if.h index e98bfbb1e07e..16255c2ca2f4 100644 --- a/include/linux/intel-ish-client-if.h +++ b/include/linux/intel-ish-client-if.h | |||
@@ -77,6 +77,8 @@ int ishtp_register_event_cb(struct ishtp_cl_device *device, | |||
77 | struct device *ishtp_device(struct ishtp_cl_device *cl_device); | 77 | struct device *ishtp_device(struct ishtp_cl_device *cl_device); |
78 | /* Trace interface for clients */ | 78 | /* Trace interface for clients */ |
79 | void *ishtp_trace_callback(struct ishtp_cl_device *cl_device); | 79 | void *ishtp_trace_callback(struct ishtp_cl_device *cl_device); |
80 | /* Get device pointer of PCI device for DMA acces */ | ||
81 | struct device *ishtp_get_pci_device(struct ishtp_cl_device *cl_device); | ||
80 | 82 | ||
81 | struct ishtp_cl *ishtp_cl_allocate(struct ishtp_cl_device *cl_device); | 83 | struct ishtp_cl *ishtp_cl_allocate(struct ishtp_cl_device *cl_device); |
82 | void ishtp_cl_free(struct ishtp_cl *cl); | 84 | void ishtp_cl_free(struct ishtp_cl *cl); |