All of lore.kernel.org
 help / color / mirror / Atom feed
From: Benjamin Tissoires <benjamin.tissoires@redhat.com>
To: Jiri Kosina <jikos@kernel.org>, Ping Cheng <pinglinux@gmail.com>,
	Jason Gerecke <killertofu@gmail.com>,
	Aaron Skomra <skomra@gmail.com>
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	[thread overview]
Message-ID: <20170120152014.19775-5-benjamin.tissoires@redhat.com> (raw)
In-Reply-To: <20170120152014.19775-1-benjamin.tissoires@redhat.com>

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 <benjamin.tissoires@redhat.com>
---
 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;
-- 
2.9.3

  parent reply	other threads:[~2017-01-20 15:20 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-01-20 15:20 [PATCH 0/4] HID: wacom: fixes for next Benjamin Tissoires
2017-01-20 15:20 ` [PATCH 1/4] HID: wacom: release the resources before leaving despite devm Benjamin Tissoires
2017-01-20 15:20 ` [PATCH 2/4] HID: wacom: remove warning while disconnecting devices Benjamin Tissoires
2017-01-20 15:20 ` [PATCH 3/4] HID: wacom: do not attempt to switch mode while in probe Benjamin Tissoires
2017-01-20 15:20 ` Benjamin Tissoires [this message]
2017-01-21  2:31   ` [PATCH 4/4] HID: wacom: do not shout an error on LED control Jason Gerecke
2017-01-21  2:35 ` [PATCH 0/4] HID: wacom: fixes for next Jason Gerecke
2017-01-23  8:02   ` Benjamin Tissoires
2017-01-23 10:01     ` Jiri Kosina

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20170120152014.19775-5-benjamin.tissoires@redhat.com \
    --to=benjamin.tissoires@redhat.com \
    --cc=jikos@kernel.org \
    --cc=killertofu@gmail.com \
    --cc=linux-input@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=pinglinux@gmail.com \
    --cc=skomra@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.