From patchwork Mon Oct 28 17:52:03 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stefan Achatz X-Patchwork-Id: 3103451 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 7AF829F431 for ; Mon, 28 Oct 2013 17:52:11 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 704DD20374 for ; Mon, 28 Oct 2013 17:52:10 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 5131920364 for ; Mon, 28 Oct 2013 17:52:09 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932187Ab3J1RwI (ORCPT ); Mon, 28 Oct 2013 13:52:08 -0400 Received: from mail-in-12.arcor-online.net ([151.189.21.52]:59996 "EHLO mail-in-12.arcor-online.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932067Ab3J1RwG (ORCPT ); Mon, 28 Oct 2013 13:52:06 -0400 Received: from mail-in-10-z2.arcor-online.net (mail-in-10-z2.arcor-online.net [151.189.8.27]) by mx.arcor.de (Postfix) with ESMTP id 8506126321; Mon, 28 Oct 2013 18:52:04 +0100 (CET) Received: from mail-in-15.arcor-online.net (mail-in-15.arcor-online.net [151.189.21.55]) by mail-in-10-z2.arcor-online.net (Postfix) with ESMTP id 7FC5728ABED; Mon, 28 Oct 2013 18:52:04 +0100 (CET) X-Greylist: Passed host: 88.66.243.220 X-DKIM: Sendmail DKIM Filter v2.8.2 mail-in-15.arcor-online.net 22ACF1AB543 X-Greylist: Passed host: 88.66.243.220 X-Greylist: Passed host: 88.66.243.220 X-Greylist: Passed host: 88.66.243.220 X-Greylist: Passed host: 88.66.243.220 X-Greylist: Passed host: 88.66.243.220 Received: from [192.168.0.7] (dslb-088-066-243-220.pools.arcor-ip.net [88.66.243.220]) (Authenticated sender: screamingfist@arcor.de) by mail-in-15.arcor-online.net (Postfix) with ESMTPSA id 22ACF1AB543; Mon, 28 Oct 2013 18:52:04 +0100 (CET) Subject: [PATCH 1/3] HID: roccat: Added new device return value From: Stefan Achatz Reply-To: erazor_de@users.sourceforge.net To: Stefan Achatz , Rob Landley , Jiri Kosina , linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, linux-input@vger.kernel.org Date: Mon, 28 Oct 2013 18:52:03 +0100 Message-ID: <1382982723.2453.9.camel@neuromancer.tessier-ashpool> Mime-Version: 1.0 X-Mailer: Evolution 2.30.3 (2.30.3-1.fc13) Sender: linux-input-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-input@vger.kernel.org X-Spam-Status: No, score=-6.1 required=5.0 tests=BAYES_00, RCVD_IN_BL_SPAMCOP_NET, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, 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 Ryos uses a new return value for critical errors, others have been confirmed. Signed-off-by: Stefan Achatz --- drivers/hid/hid-roccat-common.c | 12 ++++++------ 1 files changed, 6 insertions(+), 6 deletions(-) diff --git a/drivers/hid/hid-roccat-common.c b/drivers/hid/hid-roccat-common.c index 74f7040..e840899 100644 --- a/drivers/hid/hid-roccat-common.c +++ b/drivers/hid/hid-roccat-common.c @@ -65,10 +65,11 @@ int roccat_common2_send(struct usb_device *usb_dev, uint report_id, EXPORT_SYMBOL_GPL(roccat_common2_send); enum roccat_common2_control_states { - ROCCAT_COMMON_CONTROL_STATUS_OVERLOAD = 0, + ROCCAT_COMMON_CONTROL_STATUS_CRITICAL = 0, ROCCAT_COMMON_CONTROL_STATUS_OK = 1, ROCCAT_COMMON_CONTROL_STATUS_INVALID = 2, - ROCCAT_COMMON_CONTROL_STATUS_WAIT = 3, + ROCCAT_COMMON_CONTROL_STATUS_BUSY = 3, + ROCCAT_COMMON_CONTROL_STATUS_CRITICAL_NEW = 4, }; static int roccat_common2_receive_control_status(struct usb_device *usb_dev) @@ -88,13 +89,12 @@ static int roccat_common2_receive_control_status(struct usb_device *usb_dev) switch (control.value) { case ROCCAT_COMMON_CONTROL_STATUS_OK: return 0; - case ROCCAT_COMMON_CONTROL_STATUS_WAIT: + case ROCCAT_COMMON_CONTROL_STATUS_BUSY: msleep(500); continue; case ROCCAT_COMMON_CONTROL_STATUS_INVALID: - - case ROCCAT_COMMON_CONTROL_STATUS_OVERLOAD: - /* seems to be critical - replug necessary */ + case ROCCAT_COMMON_CONTROL_STATUS_CRITICAL: + case ROCCAT_COMMON_CONTROL_STATUS_CRITICAL_NEW: return -EINVAL; default: dev_err(&usb_dev->dev,