Skip to content

Commit

Permalink
HID: hid-gfrm: avoid warning for input_configured API change
Browse files Browse the repository at this point in the history
The input_configured callback was recently changed to return
an 'int', but the newly added driver uses the old API:

drivers/hid/hid-gfrm.c:151:22: warning: initialization from incompatible pointer type [-Wincompatible-pointer-types]

This changes the driver like the other ones.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Fixes: 34fc132 ("HID: hid-gfrm: Google Fiber TV Box remote controls")
Fixes: b2c68a2 ("HID: hid-input: allow input_configured callback return errors")
Acked-by: Petri Gynther <pgynther@google.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
  • Loading branch information
Arnd Bergmann authored and Dmitry Torokhov committed Nov 5, 2015
1 parent 9154301 commit e60e063
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion drivers/hid/hid-gfrm.c
Original file line number Diff line number Diff line change
Expand Up @@ -88,14 +88,15 @@ static int gfrm_raw_event(struct hid_device *hdev, struct hid_report *report,
return (ret < 0) ? ret : -1;
}

static void gfrm_input_configured(struct hid_device *hid, struct hid_input *hidinput)
static int gfrm_input_configured(struct hid_device *hid, struct hid_input *hidinput)
{
/*
* Enable software autorepeat with:
* - repeat delay: 400 msec
* - repeat period: 100 msec
*/
input_enable_softrepeat(hidinput->input, 400, 100);
return 0;
}

static int gfrm_probe(struct hid_device *hdev, const struct hid_device_id *id)
Expand Down

0 comments on commit e60e063

Please sign in to comment.