aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/hid/i2c-hid/i2c-hid.c
diff options
context:
space:
mode:
authorDavid Herrmann <dh.herrmann@gmail.com>2013-07-15 13:10:14 -0400
committerJiri Kosina <jkosina@suse.cz>2013-07-31 04:31:47 -0400
commitac126f46cbab355d045772c1ecce899b683b2745 (patch)
tree7e57d2d9214f3df7bb90ff8655214307c0cd27f9 /drivers/hid/i2c-hid/i2c-hid.c
parentbfde79cb3541170f8413bc8be34406f86c49392a (diff)
HID: i2c: use generic hidinput_input_event()
HID core provides the same functionality, so drop the custom handler. Besides, the current handler doesn't schedule any outgoing report so it did not work, anyway. Signed-off-by: David Herrmann <dh.herrmann@gmail.com> Reviewed-by: Benjamin Tissoires <benjamin.tissoires@redhat.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
Diffstat (limited to 'drivers/hid/i2c-hid/i2c-hid.c')
-rw-r--r--drivers/hid/i2c-hid/i2c-hid.c24
1 files changed, 0 insertions, 24 deletions
diff --git a/drivers/hid/i2c-hid/i2c-hid.c b/drivers/hid/i2c-hid/i2c-hid.c
index 879b0ed701a3..db2253b5193a 100644
--- a/drivers/hid/i2c-hid/i2c-hid.c
+++ b/drivers/hid/i2c-hid/i2c-hid.c
@@ -756,29 +756,6 @@ static int i2c_hid_power(struct hid_device *hid, int lvl)
756 return ret; 756 return ret;
757} 757}
758 758
759static int i2c_hid_hidinput_input_event(struct input_dev *dev,
760 unsigned int type, unsigned int code, int value)
761{
762 struct hid_device *hid = input_get_drvdata(dev);
763 struct hid_field *field;
764 int offset;
765
766 if (type == EV_FF)
767 return input_ff_event(dev, type, code, value);
768
769 if (type != EV_LED)
770 return -1;
771
772 offset = hidinput_find_field(hid, type, code, &field);
773
774 if (offset == -1) {
775 hid_warn(dev, "event field not found\n");
776 return -1;
777 }
778
779 return hid_set_field(field, offset, value);
780}
781
782static struct hid_ll_driver i2c_hid_ll_driver = { 759static struct hid_ll_driver i2c_hid_ll_driver = {
783 .parse = i2c_hid_parse, 760 .parse = i2c_hid_parse,
784 .start = i2c_hid_start, 761 .start = i2c_hid_start,
@@ -787,7 +764,6 @@ static struct hid_ll_driver i2c_hid_ll_driver = {
787 .close = i2c_hid_close, 764 .close = i2c_hid_close,
788 .power = i2c_hid_power, 765 .power = i2c_hid_power,
789 .request = i2c_hid_request, 766 .request = i2c_hid_request,
790 .hidinput_input_event = i2c_hid_hidinput_input_event,
791}; 767};
792 768
793static int i2c_hid_init_irq(struct i2c_client *client) 769static int i2c_hid_init_irq(struct i2c_client *client)