* [PATCH] HID: wacom - PAD is independent with pen/touch
@ 2014-11-21 0:31 Ping Cheng
2014-11-25 19:11 ` Ping Cheng
2014-11-26 9:44 ` Jiri Kosina
0 siblings, 2 replies; 6+ messages in thread
From: Ping Cheng @ 2014-11-21 0:31 UTC (permalink / raw)
To: jkosina; +Cc: linux-input, benjamin.tissoires, Ping Cheng
PAD can be on pen interface (Intuos Pro and Cintiq series) or touch
interface (Bamboo PT and Intuos PT series) or its own interface
(Bamboo pen-only and Intuos Pen M/S). We need to mark it independently.
Signed-off-by: Ping Cheng <pingc@wacom.com>
Reviewed-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>
---
drivers/hid/wacom_sys.c | 8 +++++---
drivers/hid/wacom_wac.h | 1 +
2 files changed, 6 insertions(+), 3 deletions(-)
diff --git a/drivers/hid/wacom_sys.c b/drivers/hid/wacom_sys.c
index 68b6cd6..eb55316 100644
--- a/drivers/hid/wacom_sys.c
+++ b/drivers/hid/wacom_sys.c
@@ -1135,7 +1135,7 @@ static void wacom_clean_inputs(struct wacom *wacom)
input_free_device(wacom->wacom_wac.input);
}
if (wacom->wacom_wac.pad_input) {
- if (wacom->wacom_wac.input_registered)
+ if (wacom->wacom_wac.pad_registered)
input_unregister_device(wacom->wacom_wac.pad_input);
else
input_free_device(wacom->wacom_wac.pad_input);
@@ -1162,6 +1162,7 @@ static int wacom_register_inputs(struct wacom *wacom)
error = input_register_device(input_dev);
if (error)
return error;
+ wacom_wac->input_registered = true;
}
error = wacom_setup_pad_input_capabilities(pad_input_dev, wacom_wac);
@@ -1174,22 +1175,23 @@ static int wacom_register_inputs(struct wacom *wacom)
error = input_register_device(pad_input_dev);
if (error)
goto fail_register_pad_input;
+ wacom_wac->pad_registered = true;
error = wacom_initialize_leds(wacom);
if (error)
goto fail_leds;
}
- wacom_wac->input_registered = true;
-
return 0;
fail_leds:
input_unregister_device(pad_input_dev);
pad_input_dev = NULL;
+ wacom_wac->pad_registered = false;
fail_register_pad_input:
input_unregister_device(input_dev);
wacom_wac->input = NULL;
+ wacom_wac->input_registered = false;
return error;
}
diff --git a/drivers/hid/wacom_wac.h b/drivers/hid/wacom_wac.h
index 0f0b85e..128cbb3 100644
--- a/drivers/hid/wacom_wac.h
+++ b/drivers/hid/wacom_wac.h
@@ -183,6 +183,7 @@ struct wacom_wac {
struct input_dev *input;
struct input_dev *pad_input;
bool input_registered;
+ bool pad_registered;
int pid;
int battery_capacity;
int num_contacts_left;
--
1.9.1
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH] HID: wacom - PAD is independent with pen/touch
2014-11-21 0:31 [PATCH] HID: wacom - PAD is independent with pen/touch Ping Cheng
@ 2014-11-25 19:11 ` Ping Cheng
2014-11-25 19:56 ` Jiri Kosina
2014-11-26 9:44 ` Jiri Kosina
1 sibling, 1 reply; 6+ messages in thread
From: Ping Cheng @ 2014-11-25 19:11 UTC (permalink / raw)
To: Jiri Kosina; +Cc: linux-input, Benjamin Tissoires
Hi Jiri,
Please don't forget to merge this patch. It fixes a bad pointer issue...
Thanks,
Ping
On Thu, Nov 20, 2014 at 4:31 PM, Ping Cheng <pinglinux@gmail.com> wrote:
> PAD can be on pen interface (Intuos Pro and Cintiq series) or touch
> interface (Bamboo PT and Intuos PT series) or its own interface
> (Bamboo pen-only and Intuos Pen M/S). We need to mark it independently.
>
> Signed-off-by: Ping Cheng <pingc@wacom.com>
> Reviewed-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>
> ---
> drivers/hid/wacom_sys.c | 8 +++++---
> drivers/hid/wacom_wac.h | 1 +
> 2 files changed, 6 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/hid/wacom_sys.c b/drivers/hid/wacom_sys.c
> index 68b6cd6..eb55316 100644
> --- a/drivers/hid/wacom_sys.c
> +++ b/drivers/hid/wacom_sys.c
> @@ -1135,7 +1135,7 @@ static void wacom_clean_inputs(struct wacom *wacom)
> input_free_device(wacom->wacom_wac.input);
> }
> if (wacom->wacom_wac.pad_input) {
> - if (wacom->wacom_wac.input_registered)
> + if (wacom->wacom_wac.pad_registered)
> input_unregister_device(wacom->wacom_wac.pad_input);
> else
> input_free_device(wacom->wacom_wac.pad_input);
> @@ -1162,6 +1162,7 @@ static int wacom_register_inputs(struct wacom *wacom)
> error = input_register_device(input_dev);
> if (error)
> return error;
> + wacom_wac->input_registered = true;
> }
>
> error = wacom_setup_pad_input_capabilities(pad_input_dev, wacom_wac);
> @@ -1174,22 +1175,23 @@ static int wacom_register_inputs(struct wacom *wacom)
> error = input_register_device(pad_input_dev);
> if (error)
> goto fail_register_pad_input;
> + wacom_wac->pad_registered = true;
>
> error = wacom_initialize_leds(wacom);
> if (error)
> goto fail_leds;
> }
>
> - wacom_wac->input_registered = true;
> -
> return 0;
>
> fail_leds:
> input_unregister_device(pad_input_dev);
> pad_input_dev = NULL;
> + wacom_wac->pad_registered = false;
> fail_register_pad_input:
> input_unregister_device(input_dev);
> wacom_wac->input = NULL;
> + wacom_wac->input_registered = false;
> return error;
> }
>
> diff --git a/drivers/hid/wacom_wac.h b/drivers/hid/wacom_wac.h
> index 0f0b85e..128cbb3 100644
> --- a/drivers/hid/wacom_wac.h
> +++ b/drivers/hid/wacom_wac.h
> @@ -183,6 +183,7 @@ struct wacom_wac {
> struct input_dev *input;
> struct input_dev *pad_input;
> bool input_registered;
> + bool pad_registered;
> int pid;
> int battery_capacity;
> int num_contacts_left;
> --
> 1.9.1
>
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] HID: wacom - PAD is independent with pen/touch
2014-11-25 19:11 ` Ping Cheng
@ 2014-11-25 19:56 ` Jiri Kosina
2014-11-25 22:33 ` Ping Cheng
0 siblings, 1 reply; 6+ messages in thread
From: Jiri Kosina @ 2014-11-25 19:56 UTC (permalink / raw)
To: Ping Cheng; +Cc: linux-input, Benjamin Tissoires
On Tue, 25 Nov 2014, Ping Cheng wrote:
> Please don't forget to merge this patch. It fixes a bad pointer issue...
Hi Ping,
yes, it's in my queue for this evening or tomorrow.
I will also add Cc: stable, ok?
Thanks,
--
Jiri Kosina
SUSE Labs
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] HID: wacom - PAD is independent with pen/touch
2014-11-25 19:56 ` Jiri Kosina
@ 2014-11-25 22:33 ` Ping Cheng
2014-11-25 22:34 ` Jiri Kosina
0 siblings, 1 reply; 6+ messages in thread
From: Ping Cheng @ 2014-11-25 22:33 UTC (permalink / raw)
To: Jiri Kosina; +Cc: linux-input, Benjamin Tissoires
On Tue, Nov 25, 2014 at 11:56 AM, Jiri Kosina <jkosina@suse.cz> wrote:
> On Tue, 25 Nov 2014, Ping Cheng wrote:
>
>> Please don't forget to merge this patch. It fixes a bad pointer issue...
>
> Hi Ping,
>
> yes, it's in my queue for this evening or tomorrow.
Thank you.
> I will also add Cc: stable, ok?
If you Cc this one to stable, please also include my other three
patches, dated Nov. 18, 2014, under your wacom-3.19 branch. Those four
patches go together to fix a system freeze issue caused by Bamboo Pen
only device.
Cheers,
Ping
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] HID: wacom - PAD is independent with pen/touch
2014-11-25 22:33 ` Ping Cheng
@ 2014-11-25 22:34 ` Jiri Kosina
0 siblings, 0 replies; 6+ messages in thread
From: Jiri Kosina @ 2014-11-25 22:34 UTC (permalink / raw)
To: Ping Cheng; +Cc: linux-input, Benjamin Tissoires
On Tue, 25 Nov 2014, Ping Cheng wrote:
> > I will also add Cc: stable, ok?
>
> If you Cc this one to stable, please also include my other three
> patches, dated Nov. 18, 2014, under your wacom-3.19 branch. Those four
> patches go together to fix a system freeze issue caused by Bamboo Pen
> only device.
Gah, I was sure I did, but looking at the tree, I didn't. Thanks for
pointing that out, I will sort it out.
--
Jiri Kosina
SUSE Labs
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] HID: wacom - PAD is independent with pen/touch
2014-11-21 0:31 [PATCH] HID: wacom - PAD is independent with pen/touch Ping Cheng
2014-11-25 19:11 ` Ping Cheng
@ 2014-11-26 9:44 ` Jiri Kosina
1 sibling, 0 replies; 6+ messages in thread
From: Jiri Kosina @ 2014-11-26 9:44 UTC (permalink / raw)
To: Ping Cheng; +Cc: linux-input, benjamin.tissoires, Ping Cheng
On Thu, 20 Nov 2014, Ping Cheng wrote:
> PAD can be on pen interface (Intuos Pro and Cintiq series) or touch
> interface (Bamboo PT and Intuos PT series) or its own interface
> (Bamboo pen-only and Intuos Pen M/S). We need to mark it independently.
>
> Signed-off-by: Ping Cheng <pingc@wacom.com>
> Reviewed-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>
Applied to for-3.19/wacom.
--
Jiri Kosina
SUSE Labs
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2014-11-26 9:44 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-11-21 0:31 [PATCH] HID: wacom - PAD is independent with pen/touch Ping Cheng
2014-11-25 19:11 ` Ping Cheng
2014-11-25 19:56 ` Jiri Kosina
2014-11-25 22:33 ` Ping Cheng
2014-11-25 22:34 ` Jiri Kosina
2014-11-26 9:44 ` Jiri Kosina
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).