HID: hid-gfrm: avoid warning for input_configured API change
authorArnd Bergmann <arnd@arndb.de>
Thu, 5 Nov 2015 18:10:27 +0000 (10:10 -0800)
committerDmitry Torokhov <dmitry.torokhov@gmail.com>
Thu, 5 Nov 2015 18:15:35 +0000 (10:15 -0800)
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: 34fc1322e7aa ("HID: hid-gfrm: Google Fiber TV Box remote controls")
Fixes: b2c68a2f1bab ("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>
drivers/hid/hid-gfrm.c

index 4d7b7e7f0792ac77edcd5f426ac8f8d64bab7818..075b1c020846594dbe26a908ee04379a7444224e 100644 (file)
@@ -88,7 +88,7 @@ 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:
@@ -96,6 +96,7 @@ static void gfrm_input_configured(struct hid_device *hid, struct hid_input *hidi
         * - 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)