From patchwork Mon Feb 17 23:43:07 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jiri Kosina X-Patchwork-Id: 3666371 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 1A8239F38B for ; Mon, 17 Feb 2014 23:43:22 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 52DF2201FE for ; Mon, 17 Feb 2014 23:43:21 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 3423B2020F for ; Mon, 17 Feb 2014 23:43:20 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753030AbaBQXnS (ORCPT ); Mon, 17 Feb 2014 18:43:18 -0500 Received: from cantor2.suse.de ([195.135.220.15]:52151 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752831AbaBQXnR (ORCPT ); Mon, 17 Feb 2014 18:43:17 -0500 Received: from relay2.suse.de (charybdis-ext.suse.de [195.135.220.254]) by mx2.suse.de (Postfix) with ESMTP id 21BA6AC95; Mon, 17 Feb 2014 23:43:16 +0000 (UTC) Date: Tue, 18 Feb 2014 00:43:07 +0100 (CET) From: Jiri Kosina To: David Barksdale cc: linux-input@vger.kernel.org, fengguang.wu@intel.com Subject: [PATCH] HID: cp2112: convert to use hid_hw_raw_request() Message-ID: User-Agent: Alpine 2.00 (LNX 1167 2008-08-23) MIME-Version: 1.0 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.5 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable 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 Commit cafebc0 ("HID: remove hid_get_raw_report in struct hid_device") obsoletes the use of hdev->hid_get_raw_report(), as calling hid_hw_raw_request() is functionally equivalent. Convert cp2112 to use this notation. Reported-by: fengguang.wu@intel.com Signed-off-by: Jiri Kosina --- drivers/hid/hid-cp2112.c | 18 ++++++++++-------- 1 files changed, 10 insertions(+), 8 deletions(-) diff --git a/drivers/hid/hid-cp2112.c b/drivers/hid/hid-cp2112.c index f326726..6d679f1 100644 --- a/drivers/hid/hid-cp2112.c +++ b/drivers/hid/hid-cp2112.c @@ -174,8 +174,9 @@ static int cp2112_gpio_direction_input(struct gpio_chip *chip, unsigned offset) u8 buf[5]; int ret; - ret = hdev->hid_get_raw_report(hdev, CP2112_GPIO_CONFIG, buf, - sizeof(buf), HID_FEATURE_REPORT); + ret = hid_hw_raw_request(hdev, CP2112_GPIO_CONFIG, buf, + sizeof(buf), HID_FEATURE_REPORT, + HID_REQ_GET_REPORT); if (ret != sizeof(buf)) { hid_err(hdev, "error requesting GPIO config: %d\n", ret); return ret; @@ -220,8 +221,8 @@ static int cp2112_gpio_get(struct gpio_chip *chip, unsigned offset) u8 buf[2]; int ret; - ret = hdev->hid_get_raw_report(hdev, CP2112_GPIO_GET, buf, sizeof(buf), - HID_FEATURE_REPORT); + ret = hid_hw_raw_request(hdev, CP2112_GPIO_GET, buf, sizeof(buf), + HID_FEATURE_REPORT, HID_REQ_GET_REPORT); if (ret != sizeof(buf)) { hid_err(hdev, "error requesting GPIO values: %d\n", ret); return ret; @@ -241,8 +242,9 @@ static int cp2112_gpio_direction_output(struct gpio_chip *chip, cp2112_gpio_set(chip, offset, value); - ret = hdev->hid_get_raw_report(hdev, CP2112_GPIO_CONFIG, buf, - sizeof(buf), HID_FEATURE_REPORT); + ret = hid_hw_raw_request(hdev, CP2112_GPIO_CONFIG, buf, + sizeof(buf), HID_FEATURE_REPORT, + HID_REQ_GET_REPORT); if (ret != sizeof(buf)) { hid_err(hdev, "error requesting GPIO config: %d\n", ret); return ret; @@ -271,8 +273,8 @@ static int cp2112_hid_get(struct hid_device *hdev, unsigned char report_number, if (!buf) return -ENOMEM; - ret = hdev->hid_get_raw_report(hdev, report_number, buf, count, - report_type); + ret = hid_hw_raw_request(hdev, report_number, buf, count, + report_type, HID_REQ_GET_REPORT); memcpy(data, buf, count); kfree(buf); return ret;