diff options
author | Hong Liu | 2019-03-18 20:14:19 +0100 |
---|---|---|
committer | Jiri Kosina | 2019-03-19 11:57:23 +0100 |
commit | 6b3f75f75fdd225f8c5927b938c29bd24c21fc1b (patch) | |
tree | 9ffaea6deae505cae126d5cb2aec6103368ce7cc /drivers/hid/intel-ish-hid/ishtp/bus.h | |
parent | HID: intel-ish: enable raw interface to HID devices on ISH (diff) | |
download | kernel-qcow2-linux-6b3f75f75fdd225f8c5927b938c29bd24c21fc1b.tar.gz kernel-qcow2-linux-6b3f75f75fdd225f8c5927b938c29bd24c21fc1b.tar.xz kernel-qcow2-linux-6b3f75f75fdd225f8c5927b938c29bd24c21fc1b.zip |
HID: intel-ish-hid: Add match callback to ishtp bus type
Currently we depend on the guid check in ishtp_cl_driver.probe to match
the device and driver. However Linux device core first calls the match()
callback to decide the matching of driver and device, and then does some
preparation before calling the driver probe function. If we return error
in the driver probe, it needs to tear down all the preparation work and
retry with next driver.
Adding the match callback can avoid the unnecessary entry into unmatched
driver probe function for ishtp clients reported by FW.
Signed-off-by: Hong Liu <hong.liu@intel.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
Diffstat (limited to 'drivers/hid/intel-ish-hid/ishtp/bus.h')
-rw-r--r-- | drivers/hid/intel-ish-hid/ishtp/bus.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/hid/intel-ish-hid/ishtp/bus.h b/drivers/hid/intel-ish-hid/ishtp/bus.h index 4cf7ad586c37..c96e7fb42f01 100644 --- a/drivers/hid/intel-ish-hid/ishtp/bus.h +++ b/drivers/hid/intel-ish-hid/ishtp/bus.h @@ -64,6 +64,7 @@ struct ishtp_cl_device { struct ishtp_cl_driver { struct device_driver driver; const char *name; + const guid_t *guid; int (*probe)(struct ishtp_cl_device *dev); int (*remove)(struct ishtp_cl_device *dev); int (*reset)(struct ishtp_cl_device *dev); |