From patchwork Fri Jan 20 15:20:14 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Benjamin Tissoires X-Patchwork-Id: 9528755 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 2B36860459 for ; Fri, 20 Jan 2017 15:21:05 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 1C76A286A2 for ; Fri, 20 Jan 2017 15:21:05 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 11194286A9; Fri, 20 Jan 2017 15:21:05 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=2.0 tests=BAYES_00,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id BE18E286A2 for ; Fri, 20 Jan 2017 15:21:04 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752809AbdATPUh (ORCPT ); Fri, 20 Jan 2017 10:20:37 -0500 Received: from mx1.redhat.com ([209.132.183.28]:37106 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752541AbdATPUf (ORCPT ); Fri, 20 Jan 2017 10:20:35 -0500 Received: from int-mx10.intmail.prod.int.phx2.redhat.com (int-mx10.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id E1ACF8046D; Fri, 20 Jan 2017 15:20:30 +0000 (UTC) Received: from plouf.banquise.eu.com (ovpn-116-46.ams2.redhat.com [10.36.116.46]) by int-mx10.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id v0KFKLiq004876; Fri, 20 Jan 2017 10:20:29 -0500 From: Benjamin Tissoires To: Jiri Kosina , Ping Cheng , Jason Gerecke , Aaron Skomra Cc: linux-kernel@vger.kernel.org, linux-input@vger.kernel.org Subject: [PATCH 4/4] HID: wacom: do not shout an error on LED control Date: Fri, 20 Jan 2017 16:20:14 +0100 Message-Id: <20170120152014.19775-5-benjamin.tissoires@redhat.com> In-Reply-To: <20170120152014.19775-1-benjamin.tissoires@redhat.com> References: <20170120152014.19775-1-benjamin.tissoires@redhat.com> X-Scanned-By: MIMEDefang 2.68 on 10.5.11.23 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.28]); Fri, 20 Jan 2017 15:20:31 +0000 (UTC) Sender: linux-input-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-input@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP At plug, the tablet seems to output a -EPIPE when first accessing the LED. The weird part is that the command is taken into account by the tablet, but we shout an error in the dmesg. Cut off the error so that users are happier. Signed-off-by: Benjamin Tissoires --- drivers/hid/wacom_sys.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/drivers/hid/wacom_sys.c b/drivers/hid/wacom_sys.c index 6acb422..6acf3a3 100644 --- a/drivers/hid/wacom_sys.c +++ b/drivers/hid/wacom_sys.c @@ -803,8 +803,12 @@ static int wacom_led_control(struct wacom *wacom) buf[4] = wacom->led.img_lum; } - retval = wacom_set_report(wacom->hdev, HID_FEATURE_REPORT, buf, buf_size, - WAC_CMD_RETRIES); + /* + * we do not use wacom_set_report because -EPIPE happens but is + * not fatal, so do not shout something at the user. + */ + retval = hid_hw_raw_request(wacom->hdev, buf[0], buf, buf_size, + HID_FEATURE_REPORT, HID_REQ_SET_REPORT); kfree(buf); return retval;