From patchwork Mon Jul 15 17:10:14 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: David Herrmann X-Patchwork-Id: 2827674 X-Patchwork-Delegate: jikos@jikos.cz Return-Path: X-Original-To: patchwork-linux-input@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 0846B9F967 for ; Mon, 15 Jul 2013 17:10:48 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id F3D3220286 for ; Mon, 15 Jul 2013 17:10:46 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id C30952028D for ; Mon, 15 Jul 2013 17:10:45 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751556Ab3GORKp (ORCPT ); Mon, 15 Jul 2013 13:10:45 -0400 Received: from mail-ee0-f44.google.com ([74.125.83.44]:44730 "EHLO mail-ee0-f44.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751492Ab3GORKo (ORCPT ); Mon, 15 Jul 2013 13:10:44 -0400 Received: by mail-ee0-f44.google.com with SMTP id c13so7809492eek.31 for ; Mon, 15 Jul 2013 10:10:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:x-mailer:in-reply-to:references; bh=/dFj+AtrqESjVXb/jTnYgVXSNJhTo6zQdaMUSBY33E0=; b=pbUWSvwpswbaZYriqDwf5XqRB+MZr3CtBg27oV9qHdLmCQSTv4OmKUB5HfFtKhp0Ql Fa0i7kWHzYhSFwAzwC39QT/hyxUFRlaAT7elaVzb9CPOtSKiD6GGMBu10VdvgbEKqpxn D4NVTyhka48M/J495ejUCTdbTgdPJcoQMKZKNlXL2xc9x18XLkh5m7/M65R/FkaeFm1d 7elL5PcZAdHvs56O/GP1uQ1/FYR/YvykyZFP67PDQNu/YCZeBSuenwkKDtq6Isghn9at 7joebQ1k8hKfWeDUZ1zBXXMq1gurBjoMBA7/XPcd4NOJjSNUCFBZ9YJq+kIRcUJ5ujzU SY8A== X-Received: by 10.14.218.136 with SMTP id k8mr60039824eep.111.1373908243468; Mon, 15 Jul 2013 10:10:43 -0700 (PDT) Received: from localhost.localdomain (stgt-5f71bdec.pool.mediaWays.net. [95.113.189.236]) by mx.google.com with ESMTPSA id cg12sm104118163eeb.7.2013.07.15.10.10.41 for (version=TLSv1.2 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 15 Jul 2013 10:10:42 -0700 (PDT) From: David Herrmann To: linux-input@vger.kernel.org Cc: Jiri Kosina , Benjamin Tissoires , Henrik Rydberg , Oliver Neukum , David Herrmann Subject: [RFC 5/8] HID: i2c: use generic hidinput_input_event() Date: Mon, 15 Jul 2013 19:10:14 +0200 Message-Id: <1373908217-16748-6-git-send-email-dh.herrmann@gmail.com> X-Mailer: git-send-email 1.8.3.2 In-Reply-To: <1373908217-16748-1-git-send-email-dh.herrmann@gmail.com> References: <1373908217-16748-1-git-send-email-dh.herrmann@gmail.com> Sender: linux-input-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-input@vger.kernel.org X-Spam-Status: No, score=-7.2 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, T_DKIM_INVALID, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 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 Reviewed-by: Benjamin Tissoires --- drivers/hid/i2c-hid/i2c-hid.c | 24 ------------------------ 1 file changed, 24 deletions(-) diff --git a/drivers/hid/i2c-hid/i2c-hid.c b/drivers/hid/i2c-hid/i2c-hid.c index 879b0ed..db2253b 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) return ret; } -static int i2c_hid_hidinput_input_event(struct input_dev *dev, - unsigned int type, unsigned int code, int value) -{ - struct hid_device *hid = input_get_drvdata(dev); - struct hid_field *field; - int offset; - - if (type == EV_FF) - return input_ff_event(dev, type, code, value); - - if (type != EV_LED) - return -1; - - offset = hidinput_find_field(hid, type, code, &field); - - if (offset == -1) { - hid_warn(dev, "event field not found\n"); - return -1; - } - - return hid_set_field(field, offset, value); -} - static struct hid_ll_driver i2c_hid_ll_driver = { .parse = i2c_hid_parse, .start = i2c_hid_start, @@ -787,7 +764,6 @@ static struct hid_ll_driver i2c_hid_ll_driver = { .close = i2c_hid_close, .power = i2c_hid_power, .request = i2c_hid_request, - .hidinput_input_event = i2c_hid_hidinput_input_event, }; static int i2c_hid_init_irq(struct i2c_client *client)