Patch "HID: cp2112: fix broken gpio_direction_input callback" has been added to the 4.14-stable tree
Subsystems (2)
This is a note to let you know that I've just added the patch titled
HID: cp2112: fix broken gpio_direction_input callback
to the 4.14-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary
The filename of the patch is:
hid-cp2112-fix-broken-gpio_direction_input-callback.patch
and it can be found in the queue-4.14 subdirectory.
If you, or anyone else, feels it should not be added to the stable tree, please let <[email protected]> know about it.
Quoted 1 line
From foo@baz Mon Dec 18 13:28:59 CET 2017
From: S�bastien Szymanski <[email protected]>
Date: Fri, 10 Nov 2017 10:01:43 +0100
Subject: HID: cp2112: fix broken gpio_direction_input callback
From: S�bastien Szymanski <[email protected]>
[ Upstream commit 7da85fbf1c87d4f73621e0e7666a3387497075a9 ]
When everything goes smoothly, ret is set to 0 which makes the function to return EIO error.
--- drivers/hid/hid-cp2112.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-)
drivers/hid/hid-cp2112.c +6 -2
@@ -196,6 +196,8 @@ static int cp2112_gpio_direction_input(s HID_REQ_GET_REPORT);if (ret !=CP2112_GPIO_CONFIG_LENGTH ) {hid_err (hdev,"error requesting GPIO config: %d\n" , ret); +if (ret >=0 ) + ret = -EIO ; goto exit; }
@@ -205,8 +207,10 @@ static int cp2112_gpio_direction_input(s ret =hid_hw_raw_request (hdev,CP2112_GPIO_CONFIG , buf,CP2112_GPIO_CONFIG_LENGTH ,HID_FEATURE_REPORT ,HID_REQ_SET_REPORT ); -if (ret <0 ) { +if (ret !=CP2112_GPIO_CONFIG_LENGTH ) {hid_err (hdev,"error setting GPIO config: %d\n" , ret); +if (ret >=0 ) + ret = -EIO ; goto exit; }
@@ -214,7 +218,7 @@ static int cp2112_gpio_direction_input(s exit:mutex_unlock (&dev->lock); -return ret <0 ? ret : -EIO ; +return ret; }static void cp2112_gpio_set (struct gpio_chip *chip,unsigned offset,int value)
Patches currently in stable-queue which might be from [email protected] are
queue-4.14/clk-imx6-refine-hdmi_isfr-s-parent-to-make-hdmi-work-on-i.mx6-socs-w-o-vpu.patch queue-4.14/hid-cp2112-fix-broken-gpio_direction_input-callback.patch