From patchwork Wed Sep 10 19:41:04 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ping Cheng X-Patchwork-Id: 4880351 X-Patchwork-Delegate: jikos@jikos.cz Return-Path: X-Original-To: patchwork-linux-input@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id C0195C0338 for ; Wed, 10 Sep 2014 19:41:21 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 00705201BC for ; Wed, 10 Sep 2014 19:41:21 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id D274F2010E for ; Wed, 10 Sep 2014 19:41:19 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753239AbaIJTlN (ORCPT ); Wed, 10 Sep 2014 15:41:13 -0400 Received: from mail-pd0-f180.google.com ([209.85.192.180]:46787 "EHLO mail-pd0-f180.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751624AbaIJTlK (ORCPT ); Wed, 10 Sep 2014 15:41:10 -0400 Received: by mail-pd0-f180.google.com with SMTP id ft15so9665306pdb.25 for ; Wed, 10 Sep 2014 12:41:10 -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; bh=NoDRdlabL+7ND/6S+Ue0NlP88ZI4AxRJdvvVVDkO9HM=; b=xBzIYu5q+jAMuSvQkikXgB7IBGVfLAL4eh4kOx19jB6qui67BMJcoZK2mn/CXo7fAd zaEvO9svbkZwDH0h60Z2g4q0v28vQ8HRK6QgENF9rnR/ryryHrrtfkkRXXw0jJwiCfE8 BJDfuJlLsXh8k+VCsOQaKmiFguQ0BaeTzqIUrDVemrECjBCLXcDvXD82F6yOBp5qX7Pr HoKLv92B0Dmd+D8aTJblPnFF+09Kh5RfAzRjXyY0UCRb7Y75gs6/lUHJZhNostqnOcw+ fu/+Nju48Niw7KvV/VTi3UKJ41l10le76TNTrsUW3zb8A09LDmZIM5/YDy8d/pXnRRMY 2WEA== X-Received: by 10.70.96.200 with SMTP id du8mr51405598pdb.117.1410378070057; Wed, 10 Sep 2014 12:41:10 -0700 (PDT) Received: from wacom-XPS-8500.wacom.com ([67.51.163.2]) by mx.google.com with ESMTPSA id oy9sm15399870pdb.54.2014.09.10.12.41.08 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 10 Sep 2014 12:41:08 -0700 (PDT) From: Ping Cheng X-Google-Original-From: Ping Cheng To: jkosina@suse.cz Cc: killertofu@gmail.com, linux-input@vger.kernel.org, Ping Cheng Subject: [PATCH 3/4 v2] HID: wacom - remove report_id from wacom_get_report interface Date: Wed, 10 Sep 2014 12:41:04 -0700 Message-Id: <1410378064-14545-1-git-send-email-pingc@wacom.com> X-Mailer: git-send-email 1.9.1 Sender: linux-input-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-input@vger.kernel.org X-Spam-Status: No, score=-9.3 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 It is assigned in buf[0] anyway. Signed-off-by: Ping Cheng Reviewed-by: Benjamin Tissoires --- drivers/hid/wacom_sys.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/hid/wacom_sys.c b/drivers/hid/wacom_sys.c index 4a7b9c8..f911f97 100644 --- a/drivers/hid/wacom_sys.c +++ b/drivers/hid/wacom_sys.c @@ -26,13 +26,13 @@ #define DEV_ATTR_RW_PERM (S_IRUGO | S_IWUSR | S_IWGRP) #define DEV_ATTR_WO_PERM (S_IWUSR | S_IWGRP) -static int wacom_get_report(struct hid_device *hdev, u8 type, u8 id, - void *buf, size_t size, unsigned int retries) +static int wacom_get_report(struct hid_device *hdev, u8 type, u8 *buf, + size_t size, unsigned int retries) { int retval; do { - retval = hid_hw_raw_request(hdev, id, buf, size, type, + retval = hid_hw_raw_request(hdev, buf[0], buf, size, type, HID_REQ_GET_REPORT); } while ((retval == -ETIMEDOUT || retval == -EPIPE) && --retries); @@ -258,7 +258,7 @@ static int wacom_set_device_mode(struct hid_device *hdev, int report_id, length, 1); if (error >= 0) error = wacom_get_report(hdev, HID_FEATURE_REPORT, - report_id, rep_data, length, 1); + rep_data, length, 1); } while ((error < 0 || rep_data[1] != mode) && limit++ < WAC_MSG_RETRIES); kfree(rep_data);