* [PATCH] HID: picolcd_core: Remove setting hdev->claimed before calling hid_hw_start()
@ 2012-09-13 22:15 Axel Lin
2012-09-17 16:34 ` Bruno Prémont
0 siblings, 1 reply; 2+ messages in thread
From: Axel Lin @ 2012-09-13 22:15 UTC (permalink / raw)
To: Jiri Kosina; +Cc: Bruno Prémont, linux-input
Current implementation of hid_hw_start() allows connect_mask to be 0.
Setting hdev->claimed = HID_CLAIMED_INPUT before calling hid_hw_start() is not
necessary. Remove it.
Signed-off-by: Axel Lin <axel.lin@gmail.com>
---
drivers/hid/hid-picolcd_core.c | 4 ----
1 file changed, 4 deletions(-)
diff --git a/drivers/hid/hid-picolcd_core.c b/drivers/hid/hid-picolcd_core.c
index 8c9ec1f..e30e703 100644
--- a/drivers/hid/hid-picolcd_core.c
+++ b/drivers/hid/hid-picolcd_core.c
@@ -583,11 +583,7 @@ static int picolcd_probe(struct hid_device *hdev,
goto err_cleanup_data;
}
- /* We don't use hidinput but hid_hw_start() fails if nothing is
- * claimed. So spoof claimed input. */
- hdev->claimed = HID_CLAIMED_INPUT;
error = hid_hw_start(hdev, 0);
- hdev->claimed = 0;
if (error) {
hid_err(hdev, "hardware start failed\n");
goto err_cleanup_data;
--
1.7.9.5
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] HID: picolcd_core: Remove setting hdev->claimed before calling hid_hw_start()
2012-09-13 22:15 [PATCH] HID: picolcd_core: Remove setting hdev->claimed before calling hid_hw_start() Axel Lin
@ 2012-09-17 16:34 ` Bruno Prémont
0 siblings, 0 replies; 2+ messages in thread
From: Bruno Prémont @ 2012-09-17 16:34 UTC (permalink / raw)
To: Axel Lin; +Cc: Jiri Kosina, linux-input
On Fri, 14 September 2012 Axel Lin <axel.lin@gmail.com> wrote:
> Current implementation of hid_hw_start() allows connect_mask to be 0.
> Setting hdev->claimed = HID_CLAIMED_INPUT before calling hid_hw_start() is not
> necessary. Remove it.
>
> Signed-off-by: Axel Lin <axel.lin@gmail.com>
Acked-By: Bruno Prémont <bonbons@linux-vserver.org>
This same change was applied to 3.6 but got lost while applying my
patches on 3.6rc.
I will what else (of 3.5 -> 3.6 changes) might have been lost while applying
driver code split.
Thanks for spotting.
Bruno
> ---
> drivers/hid/hid-picolcd_core.c | 4 ----
> 1 file changed, 4 deletions(-)
>
> diff --git a/drivers/hid/hid-picolcd_core.c b/drivers/hid/hid-picolcd_core.c
> index 8c9ec1f..e30e703 100644
> --- a/drivers/hid/hid-picolcd_core.c
> +++ b/drivers/hid/hid-picolcd_core.c
> @@ -583,11 +583,7 @@ static int picolcd_probe(struct hid_device *hdev,
> goto err_cleanup_data;
> }
>
> - /* We don't use hidinput but hid_hw_start() fails if nothing is
> - * claimed. So spoof claimed input. */
> - hdev->claimed = HID_CLAIMED_INPUT;
> error = hid_hw_start(hdev, 0);
> - hdev->claimed = 0;
> if (error) {
> hid_err(hdev, "hardware start failed\n");
> goto err_cleanup_data;
--
To unsubscribe from this list: send the line "unsubscribe linux-input" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2012-09-17 16:35 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-09-13 22:15 [PATCH] HID: picolcd_core: Remove setting hdev->claimed before calling hid_hw_start() Axel Lin
2012-09-17 16:34 ` Bruno Prémont
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).