* Re: [PATCH 3/3] HID: deletion of unused code in hid-magicmouse.
[not found] ` <1268065277-30129-5-git-send-email-tissoire@cena.fr>
@ 2010-03-08 16:27 ` Benjamin Tissoires
2010-03-08 16:30 ` Jiri Kosina
0 siblings, 1 reply; 10+ messages in thread
From: Benjamin Tissoires @ 2010-03-08 16:27 UTC (permalink / raw)
Cc: Jiri Kosina, Dmitry Torokhov, Michael Poole, linux-input,
Stephane Chatty
Sorry for the spam, but the last patch (3/3) is the same than the first
3/3 with a slightly different comment... My mistake with gedit, git
send-email and automatic saves (filenames that ends with ~)
Sorry again, the only good patches are the three first 1/3, 2/3 and 3/3
Cheers,
Benjamin
Le 08/03/2010 17:21, Benjamin Tissoires a écrit :
> This code is unnecessary as it concerns the old implementation and is not used
> anymore.
>
> Signed-off-by: Benjamin Tissoires<tissoire@cena.fr>
[snip]
--
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] 10+ messages in thread
* Re: [PATCH 3/3] HID: deletion of unused code in hid-magicmouse.
2010-03-08 16:27 ` Benjamin Tissoires
@ 2010-03-08 16:30 ` Jiri Kosina
2010-03-08 16:57 ` Benjamin Tissoires
0 siblings, 1 reply; 10+ messages in thread
From: Jiri Kosina @ 2010-03-08 16:30 UTC (permalink / raw)
To: Benjamin Tissoires
Cc: Dmitry Torokhov, Michael Poole, linux-input, Stephane Chatty
On Mon, 8 Mar 2010, Benjamin Tissoires wrote:
> Sorry for the spam, but the last patch (3/3) is the same than the first 3/3
> with a slightly different comment... My mistake with gedit, git send-email
> and automatic saves (filenames that ends with ~)
>
> Sorry again, the only good patches are the three first 1/3, 2/3 and 3/3
>
> Cheers,
> Benjamin
>
> Le 08/03/2010 17:21, Benjamin Tissoires a écrit :
> > This code is unnecessary as it concerns the old implementation and is not
> > used
> > anymore.
> >
> > Signed-off-by: Benjamin Tissoires<tissoire@cena.fr>
Well ... I don't see any patch titled "HID: deletion of unused code in
hid-magicmouse" neither in my inbox nor in my linux-input@ folder. Could
you perhaps please resend?
Thanks,
--
Jiri Kosina
SUSE Labs, Novell Inc.
--
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] 10+ messages in thread
* Re: [PATCH 3/3] HID: deletion of unused code in hid-magicmouse.
2010-03-08 16:30 ` Jiri Kosina
@ 2010-03-08 16:57 ` Benjamin Tissoires
2010-03-08 20:27 ` Michael Poole
2010-03-10 15:09 ` Jiri Kosina
0 siblings, 2 replies; 10+ messages in thread
From: Benjamin Tissoires @ 2010-03-08 16:57 UTC (permalink / raw)
To: Jiri Kosina; +Cc: Dmitry Torokhov, Michael Poole, linux-input, Stephane Chatty
[-- Attachment #1: Type: text/plain, Size: 288 bytes --]
>
> Well ... I don't see any patch titled "HID: deletion of unused code in
> hid-magicmouse" neither in my inbox nor in my linux-input@ folder. Could
> you perhaps please resend?
>
> Thanks,
>
Of course, I attached it. Do I need to send it in mbox format or is it ok ?
Cheers,
Benjamin
[-- Attachment #2: 0003-HID-deletion-of-unused-code-in-hid-magicmouse.patch --]
[-- Type: text/x-patch, Size: 3119 bytes --]
>From cfc6bae70e1531ef059d254ac4b91188bbc6c5c9 Mon Sep 17 00:00:00 2001
From: Benjamin Tissoires <tissoire@cena.fr>
Date: Mon, 8 Mar 2010 12:12:58 +0100
Subject: [PATCH 3/3] HID: deletion of unused code in hid-magicmouse.
This code, related to the second input device, is unnecessary as it concerns
the old implementation and is not used anymore.
Signed-off-by: Benjamin Tissoires <tissoire@cena.fr>
---
drivers/hid/hid-magicmouse.c | 68 ------------------------------------------
1 files changed, 0 insertions(+), 68 deletions(-)
diff --git a/drivers/hid/hid-magicmouse.c b/drivers/hid/hid-magicmouse.c
index 32d90c8..b9d605e 100644
--- a/drivers/hid/hid-magicmouse.c
+++ b/drivers/hid/hid-magicmouse.c
@@ -262,74 +262,6 @@ static int magicmouse_raw_event(struct hid_device *hdev,
return 1;
}
-static int magicmouse_input_open(struct input_dev *dev)
-{
- struct hid_device *hid = input_get_drvdata(dev);
-
- return hid->ll_driver->open(hid);
-}
-
-static void magicmouse_input_close(struct input_dev *dev)
-{
- struct hid_device *hid = input_get_drvdata(dev);
-
- hid->ll_driver->close(hid);
-}
-
-static void magicmouse_setup_input(struct input_dev *input, struct hid_device *hdev)
-{
- input_set_drvdata(input, hdev);
- input->event = hdev->ll_driver->hidinput_input_event;
- input->open = magicmouse_input_open;
- input->close = magicmouse_input_close;
-
- input->name = hdev->name;
- input->phys = hdev->phys;
- input->uniq = hdev->uniq;
- input->id.bustype = hdev->bus;
- input->id.vendor = hdev->vendor;
- input->id.product = hdev->product;
- input->id.version = hdev->version;
- input->dev.parent = hdev->dev.parent;
-
- __set_bit(EV_KEY, input->evbit);
- __set_bit(BTN_LEFT, input->keybit);
- __set_bit(BTN_RIGHT, input->keybit);
- if (emulate_3button)
- __set_bit(BTN_MIDDLE, input->keybit);
- __set_bit(BTN_TOOL_FINGER, input->keybit);
-
- __set_bit(EV_REL, input->evbit);
- __set_bit(REL_X, input->relbit);
- __set_bit(REL_Y, input->relbit);
- if (emulate_scroll_wheel)
- __set_bit(REL_WHEEL, input->relbit);
-
- if (report_touches) {
- __set_bit(EV_ABS, input->evbit);
-
- input_set_abs_params(input, ABS_MT_TRACKING_ID, 0, 15, 0, 0);
- input_set_abs_params(input, ABS_MT_TOUCH_MAJOR, 0, 255, 4, 0);
- input_set_abs_params(input, ABS_MT_TOUCH_MINOR, 0, 255, 4, 0);
- input_set_abs_params(input, ABS_MT_ORIENTATION, -32, 31, 1, 0);
- input_set_abs_params(input, ABS_MT_POSITION_X, -1100, 1358,
- 4, 0);
- /* Note: Touch Y position from the device is inverted relative
- * to how pointer motion is reported (and relative to how USB
- * HID recommends the coordinates work). This driver keeps
- * the origin at the same position, and just uses the additive
- * inverse of the reported Y.
- */
- input_set_abs_params(input, ABS_MT_POSITION_Y, -1589, 2047,
- 4, 0);
- }
-
- if (report_undeciphered) {
- __set_bit(EV_MSC, input->evbit);
- __set_bit(MSC_RAW, input->mscbit);
- }
-}
-
static int magicmouse_input_mapping(struct hid_device *hdev, struct hid_input *hinput,
struct hid_field *field, struct hid_usage *usage,
unsigned long **bit, int *max)
--
1.6.6.1
^ permalink raw reply related [flat|nested] 10+ messages in thread
* Re: [PATCH 3/3] HID: deletion of unused code in hid-magicmouse.
2010-03-08 16:57 ` Benjamin Tissoires
@ 2010-03-08 20:27 ` Michael Poole
2010-03-08 20:51 ` Benjamin Tissoires
2010-03-10 15:09 ` Jiri Kosina
1 sibling, 1 reply; 10+ messages in thread
From: Michael Poole @ 2010-03-08 20:27 UTC (permalink / raw)
To: Benjamin Tissoires
Cc: Jiri Kosina, Dmitry Torokhov, linux-input, Stephane Chatty
Benjamin Tissoires writes:
>>
>> Well ... I don't see any patch titled "HID: deletion of unused code in
>> hid-magicmouse" neither in my inbox nor in my linux-input@ folder. Could
>> you perhaps please resend?
>>
>> Thanks,
>>
>
> Of course, I attached it. Do I need to send it in mbox format or is it ok ?
>
> Cheers,
> Benjamin
The recommended practice for sending patches is (from
Documentation/SubmittingPatches) "7) No MIME, no links, no compression,
no attachments. Just plain text."
I'm a bit mystified, though -- if magicmouse_setup_input() is from "the
old implementation", where is the new implementation? Jiri's
hid/for-next and hid/master trees definitely use the input device that
it sets up. The "magicmouse_input_mapping" function that shows up at
the end of your patch doesn't exist in those trees. The reason I didn't
use input_mapping() initially was because it only allows setting up one
input field, and the touch records generate multiple types of events.
Michael Poole
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH 3/3] HID: deletion of unused code in hid-magicmouse.
2010-03-08 20:27 ` Michael Poole
@ 2010-03-08 20:51 ` Benjamin Tissoires
2010-03-08 23:56 ` Jiri Kosina
0 siblings, 1 reply; 10+ messages in thread
From: Benjamin Tissoires @ 2010-03-08 20:51 UTC (permalink / raw)
To: Michael Poole
Cc: Benjamin Tissoires, Jiri Kosina, Dmitry Torokhov, linux-input,
Stephane Chatty
Sorry about that, I'm beginning in sending patch for the kernel. I tried
to use the git send-email command, but I saw after that the command just
send email to the people I added, but not the mailing list. To be sure
to (re)send the last patch, I attached it to be sure to send it
"correctly", but not according to the recommended practice.
I will resend the whole patch list to the mailing list.
The patch you told was not intended to be self-consistant but a final
cleanup after the two patches I tried to send before. I splitted them
like that in order to keep them human readable as git tried to intrelace
the additions and removals, even if they were not related together.
Sorry again
Benjamin
On 03/08/2010 09:27 PM, Michael Poole wrote:
> Benjamin Tissoires writes:
>
>>>
>>> Well ... I don't see any patch titled "HID: deletion of unused code in
>>> hid-magicmouse" neither in my inbox nor in my linux-input@ folder. Could
>>> you perhaps please resend?
>>>
>>> Thanks,
>>>
>>
>> Of course, I attached it. Do I need to send it in mbox format or is it ok ?
>>
>> Cheers,
>> Benjamin
>
> The recommended practice for sending patches is (from
> Documentation/SubmittingPatches) "7) No MIME, no links, no compression,
> no attachments. Just plain text."
>
> I'm a bit mystified, though -- if magicmouse_setup_input() is from "the
> old implementation", where is the new implementation? Jiri's
> hid/for-next and hid/master trees definitely use the input device that
> it sets up. The "magicmouse_input_mapping" function that shows up at
> the end of your patch doesn't exist in those trees. The reason I didn't
> use input_mapping() initially was because it only allows setting up one
> input field, and the touch records generate multiple types of events.
>
> Michael Poole
^ permalink raw reply [flat|nested] 10+ messages in thread
* [PATCH 3/3] HID: deletion of unused code in hid-magicmouse.
@ 2010-03-08 21:29 Benjamin Tissoires
0 siblings, 0 replies; 10+ messages in thread
From: Benjamin Tissoires @ 2010-03-08 21:29 UTC (permalink / raw)
To: linux-input
This code, related to the second input device, is unnecessary as it concerns
the previous implementation and is not used anymore.
Signed-off-by: Benjamin Tissoires <tissoire@cena.fr>
---
drivers/hid/hid-magicmouse.c | 68 ------------------------------------------
1 files changed, 0 insertions(+), 68 deletions(-)
diff --git a/drivers/hid/hid-magicmouse.c b/drivers/hid/hid-magicmouse.c
index 32d90c8..b9d605e 100644
--- a/drivers/hid/hid-magicmouse.c
+++ b/drivers/hid/hid-magicmouse.c
@@ -262,74 +262,6 @@ static int magicmouse_raw_event(struct hid_device *hdev,
return 1;
}
-static int magicmouse_input_open(struct input_dev *dev)
-{
- struct hid_device *hid = input_get_drvdata(dev);
-
- return hid->ll_driver->open(hid);
-}
-
-static void magicmouse_input_close(struct input_dev *dev)
-{
- struct hid_device *hid = input_get_drvdata(dev);
-
- hid->ll_driver->close(hid);
-}
-
-static void magicmouse_setup_input(struct input_dev *input, struct hid_device *hdev)
-{
- input_set_drvdata(input, hdev);
- input->event = hdev->ll_driver->hidinput_input_event;
- input->open = magicmouse_input_open;
- input->close = magicmouse_input_close;
-
- input->name = hdev->name;
- input->phys = hdev->phys;
- input->uniq = hdev->uniq;
- input->id.bustype = hdev->bus;
- input->id.vendor = hdev->vendor;
- input->id.product = hdev->product;
- input->id.version = hdev->version;
- input->dev.parent = hdev->dev.parent;
-
- __set_bit(EV_KEY, input->evbit);
- __set_bit(BTN_LEFT, input->keybit);
- __set_bit(BTN_RIGHT, input->keybit);
- if (emulate_3button)
- __set_bit(BTN_MIDDLE, input->keybit);
- __set_bit(BTN_TOOL_FINGER, input->keybit);
-
- __set_bit(EV_REL, input->evbit);
- __set_bit(REL_X, input->relbit);
- __set_bit(REL_Y, input->relbit);
- if (emulate_scroll_wheel)
- __set_bit(REL_WHEEL, input->relbit);
-
- if (report_touches) {
- __set_bit(EV_ABS, input->evbit);
-
- input_set_abs_params(input, ABS_MT_TRACKING_ID, 0, 15, 0, 0);
- input_set_abs_params(input, ABS_MT_TOUCH_MAJOR, 0, 255, 4, 0);
- input_set_abs_params(input, ABS_MT_TOUCH_MINOR, 0, 255, 4, 0);
- input_set_abs_params(input, ABS_MT_ORIENTATION, -32, 31, 1, 0);
- input_set_abs_params(input, ABS_MT_POSITION_X, -1100, 1358,
- 4, 0);
- /* Note: Touch Y position from the device is inverted relative
- * to how pointer motion is reported (and relative to how USB
- * HID recommends the coordinates work). This driver keeps
- * the origin at the same position, and just uses the additive
- * inverse of the reported Y.
- */
- input_set_abs_params(input, ABS_MT_POSITION_Y, -1589, 2047,
- 4, 0);
- }
-
- if (report_undeciphered) {
- __set_bit(EV_MSC, input->evbit);
- __set_bit(MSC_RAW, input->mscbit);
- }
-}
-
static int magicmouse_input_mapping(struct hid_device *hdev, struct hid_input *hinput,
struct hid_field *field, struct hid_usage *usage,
unsigned long **bit, int *max)
-- 1.6.6.1
^ permalink raw reply related [flat|nested] 10+ messages in thread
* Re: [PATCH 3/3] HID: deletion of unused code in hid-magicmouse.
2010-03-08 20:51 ` Benjamin Tissoires
@ 2010-03-08 23:56 ` Jiri Kosina
2010-03-09 12:00 ` Rantanplan
0 siblings, 1 reply; 10+ messages in thread
From: Jiri Kosina @ 2010-03-08 23:56 UTC (permalink / raw)
To: Benjamin Tissoires
Cc: Michael Poole, Benjamin Tissoires, Dmitry Torokhov, linux-input,
Stephane Chatty
On Mon, 8 Mar 2010, Benjamin Tissoires wrote:
> Sorry about that, I'm beginning in sending patch for the kernel. I tried to
> use the git send-email command, but I saw after that the command just send
> email to the people I added, but not the mailing list. To be sure to (re)send
> the last patch, I attached it to be sure to send it "correctly", but not
> according to the recommended practice.
>
> I will resend the whole patch list to the mailing list.
>
> The patch you told was not intended to be self-consistant but a final cleanup
> after the two patches I tried to send before. I splitted them like that in
> order to keep them human readable as git tried to intrelace the additions and
> removals, even if they were not related together.
Hi Benjamin,
well, I don't have the 1/3 and 2/3 patches anywhere in my mailboxes
either ... so please resend those as well.
Thanks,
--
Jiri Kosina
SUSE Labs, Novell Inc.
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH 3/3] HID: deletion of unused code in hid-magicmouse.
2010-03-08 23:56 ` Jiri Kosina
@ 2010-03-09 12:00 ` Rantanplan
0 siblings, 0 replies; 10+ messages in thread
From: Rantanplan @ 2010-03-09 12:00 UTC (permalink / raw)
To: Jiri Kosina
Cc: Benjamin Tissoires, Michael Poole, Dmitry Torokhov, linux-input,
Stephane Chatty
My apologies for the inconvenience. After some thought I finally
realized that the smtp server at work did not send any of the mail to
the people outside its domain, i.e. everybody except me...
Michael already reviewed the patch (I send them to the mailing list only
in order not to spam your inboxes, mistake number 2) and send his
comments, so I will resend the patch after including his notes. However,
as Michael said, the patches are a little bit heavy faced to the problem
tackled.
That's why I will answer to its mail instead of creating two threads.
Cheers,
Benjamin
Le 09/03/2010 00:56, Jiri Kosina a écrit :
> On Mon, 8 Mar 2010, Benjamin Tissoires wrote:
>
>> Sorry about that, I'm beginning in sending patch for the kernel. I tried to
>> use the git send-email command, but I saw after that the command just send
>> email to the people I added, but not the mailing list. To be sure to (re)send
>> the last patch, I attached it to be sure to send it "correctly", but not
>> according to the recommended practice.
>>
>> I will resend the whole patch list to the mailing list.
>>
>> The patch you told was not intended to be self-consistant but a final cleanup
>> after the two patches I tried to send before. I splitted them like that in
>> order to keep them human readable as git tried to intrelace the additions and
>> removals, even if they were not related together.
>
> Hi Benjamin,
>
> well, I don't have the 1/3 and 2/3 patches anywhere in my mailboxes
> either ... so please resend those as well.
>
> Thanks,
>
--
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] 10+ messages in thread
* Re: [PATCH 3/3] HID: deletion of unused code in hid-magicmouse.
2010-03-08 16:57 ` Benjamin Tissoires
2010-03-08 20:27 ` Michael Poole
@ 2010-03-10 15:09 ` Jiri Kosina
2010-03-10 15:39 ` Benjamin Tissoires
1 sibling, 1 reply; 10+ messages in thread
From: Jiri Kosina @ 2010-03-10 15:09 UTC (permalink / raw)
To: Benjamin Tissoires
Cc: Dmitry Torokhov, Michael Poole, linux-input, Stephane Chatty
On Mon, 8 Mar 2010, Benjamin Tissoires wrote:
> > Well ... I don't see any patch titled "HID: deletion of unused code in
> > hid-magicmouse" neither in my inbox nor in my linux-input@ folder. Could
> > you perhaps please resend?
> >
> > Thanks,
>
> Of course, I attached it. Do I need to send it in mbox format or is it ok ?
Well, magicmouse_setup_input() is actually used from inside the probe
routine, so we'd rather not remove it.
I have already merged Michael's patch with calls hid_hw_start() with
HID_CONNECT_HIDINPUT flag cleared out, so the registration of the input
device is now performed properly.
--
Jiri Kosina
SUSE Labs, Novell Inc.
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH 3/3] HID: deletion of unused code in hid-magicmouse.
2010-03-10 15:09 ` Jiri Kosina
@ 2010-03-10 15:39 ` Benjamin Tissoires
0 siblings, 0 replies; 10+ messages in thread
From: Benjamin Tissoires @ 2010-03-10 15:39 UTC (permalink / raw)
To: Jiri Kosina; +Cc: Dmitry Torokhov, Michael Poole, linux-input, Stephane Chatty
No problem, this patch had a meaning only with the 2 others Micheal
already reviewed.
The core idea of the series of patch was to register the fields in the
newly created report in order to having two benefits:
- use the input created by hid-input (not required anymore as you
integrated Michael's patch) and suppress the second input created by
hand (this is why the patch n°3 named "HID: deletion of unused code in
hid-magicmouse" suppress everything related to this input)
- recreate the fields in the report descriptor in order to avoid using
the raw event in a later patch.
I have now to look on how can we register fields in a report that are
non mandatory. Michael told me that he did not found it too.
After that, I will probably resend a better patch.
Cheers,
Benjamin
Le 10/03/2010 16:09, Jiri Kosina a écrit :
> On Mon, 8 Mar 2010, Benjamin Tissoires wrote:
>
>>> Well ... I don't see any patch titled "HID: deletion of unused code in
>>> hid-magicmouse" neither in my inbox nor in my linux-input@ folder. Could
>>> you perhaps please resend?
>>>
>>> Thanks,
>>
>> Of course, I attached it. Do I need to send it in mbox format or is it ok ?
>
> Well, magicmouse_setup_input() is actually used from inside the probe
> routine, so we'd rather not remove it.
>
> I have already merged Michael's patch with calls hid_hw_start() with
> HID_CONNECT_HIDINPUT flag cleared out, so the registration of the input
> device is now performed properly.
>
--
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] 10+ messages in thread
end of thread, other threads:[~2010-03-10 15:39 UTC | newest]
Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-03-08 21:29 [PATCH 3/3] HID: deletion of unused code in hid-magicmouse Benjamin Tissoires
[not found] <1268065277-30129-1-git-send-email-tissoire@cena.fr>
[not found] ` <1268065277-30129-2-git-send-email-tissoire@cena.fr>
[not found] ` <1268065277-30129-3-git-send-email-tissoire@cena.fr>
[not found] ` <1268065277-30129-4-git-send-email-tissoire@cena.fr>
[not found] ` <1268065277-30129-5-git-send-email-tissoire@cena.fr>
2010-03-08 16:27 ` Benjamin Tissoires
2010-03-08 16:30 ` Jiri Kosina
2010-03-08 16:57 ` Benjamin Tissoires
2010-03-08 20:27 ` Michael Poole
2010-03-08 20:51 ` Benjamin Tissoires
2010-03-08 23:56 ` Jiri Kosina
2010-03-09 12:00 ` Rantanplan
2010-03-10 15:09 ` Jiri Kosina
2010-03-10 15:39 ` Benjamin Tissoires
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).