diff options
author | Jon Medhurst <tixy@linaro.org> | 2015-11-02 09:18:35 +0000 |
---|---|---|
committer | Jon Medhurst <tixy@linaro.org> | 2015-11-02 09:18:35 +0000 |
commit | fd19dde40dce2a5f690740ab78b79bc95ed0499a (patch) | |
tree | 75118423673eb45b2b64dee79841460dd93b02d4 | |
parent | acd8379b9d088876ac2daabe39c364c4638573d3 (diff) | |
parent | 37d3ec5a546cef5129e948866521310543894548 (diff) |
Merge branch 'lsk-3.18-armlt-android-fixes' into integration-lsk-3.18-armlt-android
-rw-r--r-- | drivers/hid/hid-input.c | 10 | ||||
-rw-r--r-- | drivers/hid/hid-multitouch.c | 14 | ||||
-rw-r--r-- | include/linux/hid.h | 4 |
3 files changed, 10 insertions, 18 deletions
diff --git a/drivers/hid/hid-input.c b/drivers/hid/hid-input.c index 1def4bb1894b..01c7a08a66e1 100644 --- a/drivers/hid/hid-input.c +++ b/drivers/hid/hid-input.c @@ -1468,9 +1468,8 @@ int hidinput_connect(struct hid_device *hid, unsigned int force) * UGCI) cram a lot of unrelated inputs into the * same interface. */ hidinput->report = report; - if (drv->input_configured && - drv->input_configured(hid, hidinput)) - goto out_cleanup; + if (drv->input_configured) + drv->input_configured(hid, hidinput); if (input_register_device(hidinput->input)) goto out_cleanup; hidinput = NULL; @@ -1491,9 +1490,8 @@ int hidinput_connect(struct hid_device *hid, unsigned int force) } if (hidinput) { - if (drv->input_configured && - drv->input_configured(hid, hidinput)) - goto out_cleanup; + if (drv->input_configured) + drv->input_configured(hid, hidinput); if (input_register_device(hidinput->input)) goto out_cleanup; } diff --git a/drivers/hid/hid-multitouch.c b/drivers/hid/hid-multitouch.c index e6cab622fdfb..9080e3325fa5 100644 --- a/drivers/hid/hid-multitouch.c +++ b/drivers/hid/hid-multitouch.c @@ -711,13 +711,12 @@ static void mt_touch_report(struct hid_device *hid, struct hid_report *report) mt_sync_frame(td, report->field[0]->hidinput->input); } -static int mt_touch_input_configured(struct hid_device *hdev, +static void mt_touch_input_configured(struct hid_device *hdev, struct hid_input *hi) { struct mt_device *td = hid_get_drvdata(hdev); struct mt_class *cls = &td->mtclass; struct input_dev *input = hi->input; - int ret; if (!td->maxcontacts) td->maxcontacts = MT_DEFAULT_MAXCONTACT; @@ -732,12 +731,9 @@ static int mt_touch_input_configured(struct hid_device *hdev, if (cls->quirks & MT_QUIRK_NOT_SEEN_MEANS_UP) td->mt_flags |= INPUT_MT_DROP_UNUSED; - ret = input_mt_init_slots(input, td->maxcontacts, td->mt_flags); - if (ret) - return ret; + input_mt_init_slots(input, td->maxcontacts, td->mt_flags); td->mt_flags = 0; - return 0; } static int mt_input_mapping(struct hid_device *hdev, struct hid_input *hi, @@ -891,16 +887,15 @@ static void mt_post_parse(struct mt_device *td) cls->quirks &= ~MT_QUIRK_CONTACT_CNT_ACCURATE; } -static int mt_input_configured(struct hid_device *hdev, struct hid_input *hi) +static void mt_input_configured(struct hid_device *hdev, struct hid_input *hi) { struct mt_device *td = hid_get_drvdata(hdev); char *name; const char *suffix = NULL; struct hid_field *field = hi->report->field[0]; - int ret = 0; if (hi->report->id == td->mt_report_id) - ret = mt_touch_input_configured(hdev, hi); + mt_touch_input_configured(hdev, hi); /* * some egalax touchscreens have "application == HID_DG_TOUCHSCREEN" @@ -951,7 +946,6 @@ static int mt_input_configured(struct hid_device *hdev, struct hid_input *hi) hi->input->name = name; } } - return ret; } static int mt_probe(struct hid_device *hdev, const struct hid_device_id *id) diff --git a/include/linux/hid.h b/include/linux/hid.h index 15680809d345..78ea9bf941cd 100644 --- a/include/linux/hid.h +++ b/include/linux/hid.h @@ -670,8 +670,8 @@ struct hid_driver { int (*input_mapped)(struct hid_device *hdev, struct hid_input *hidinput, struct hid_field *field, struct hid_usage *usage, unsigned long **bit, int *max); - int (*input_configured)(struct hid_device *hdev, - struct hid_input *hidinput); + void (*input_configured)(struct hid_device *hdev, + struct hid_input *hidinput); void (*feature_mapping)(struct hid_device *hdev, struct hid_field *field, struct hid_usage *usage); |