* [PATCH] N-Trig: change default value of logical/physical width/height to 1
@ 2012-09-18 8:27 Jesse Sung
2012-09-25 10:51 ` [PATCH resend] " Jesse Sung
0 siblings, 1 reply; 5+ messages in thread
From: Jesse Sung @ 2012-09-18 8:27 UTC (permalink / raw)
To: linux-input
From: Wen-chien Jesse Sung <jesse.sung@canonical.com>
Since something will be divided by these variables in
show_min_width()/show_min_height() and show_activate_width()/
show_activate_height(), a divided error would be triggered if
they are zero.
Signed-off-by: Wen-chien Jesse Sung <jesse.sung@canonical.com>
---
drivers/hid/hid-ntrig.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/drivers/hid/hid-ntrig.c b/drivers/hid/hid-ntrig.c
index 9fae2eb..86a969f 100644
--- a/drivers/hid/hid-ntrig.c
+++ b/drivers/hid/hid-ntrig.c
@@ -882,10 +882,10 @@ static int ntrig_probe(struct hid_device *hdev, const struct hid_device_id *id)
nd->activate_slack = activate_slack;
nd->act_state = activate_slack;
nd->deactivate_slack = -deactivate_slack;
- nd->sensor_logical_width = 0;
- nd->sensor_logical_height = 0;
- nd->sensor_physical_width = 0;
- nd->sensor_physical_height = 0;
+ nd->sensor_logical_width = 1;
+ nd->sensor_logical_height = 1;
+ nd->sensor_physical_width = 1;
+ nd->sensor_physical_height = 1;
hid_set_drvdata(hdev, nd);
--
1.7.9.5
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [PATCH resend] N-Trig: change default value of logical/physical width/height to 1
2012-09-18 8:27 [PATCH] N-Trig: change default value of logical/physical width/height to 1 Jesse Sung
@ 2012-09-25 10:51 ` Jesse Sung
2012-09-25 12:00 ` Rafi Rubin
0 siblings, 1 reply; 5+ messages in thread
From: Jesse Sung @ 2012-09-25 10:51 UTC (permalink / raw)
To: linux-input, Rafi Rubin, Jiri Kosina
From: Wen-chien Jesse Sung <jesse.sung@canonical.com>
Since something will be divided by these variables in
show_min_width()/show_min_height() and show_activate_width()/
show_activate_height(), a divided error would be triggered if
they are zero.
Signed-off-by: Wen-chien Jesse Sung <jesse.sung@canonical.com>
---
drivers/hid/hid-ntrig.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/drivers/hid/hid-ntrig.c b/drivers/hid/hid-ntrig.c
index 9fae2eb..86a969f 100644
--- a/drivers/hid/hid-ntrig.c
+++ b/drivers/hid/hid-ntrig.c
@@ -882,10 +882,10 @@ static int ntrig_probe(struct hid_device *hdev, const struct hid_device_id *id)
nd->activate_slack = activate_slack;
nd->act_state = activate_slack;
nd->deactivate_slack = -deactivate_slack;
- nd->sensor_logical_width = 0;
- nd->sensor_logical_height = 0;
- nd->sensor_physical_width = 0;
- nd->sensor_physical_height = 0;
+ nd->sensor_logical_width = 1;
+ nd->sensor_logical_height = 1;
+ nd->sensor_physical_width = 1;
+ nd->sensor_physical_height = 1;
hid_set_drvdata(hdev, nd);
--
1.7.9.5
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH resend] N-Trig: change default value of logical/physical width/height to 1
2012-09-25 10:51 ` [PATCH resend] " Jesse Sung
@ 2012-09-25 12:00 ` Rafi Rubin
2012-09-25 13:23 ` Jiri Kosina
0 siblings, 1 reply; 5+ messages in thread
From: Rafi Rubin @ 2012-09-25 12:00 UTC (permalink / raw)
To: Jesse Sung; +Cc: linux-input, Jiri Kosina
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
On 09/25/12 06:51, Jesse Sung wrote:
> From: Wen-chien Jesse Sung <jesse.sung@canonical.com>
>
> Since something will be divided by these variables in
> show_min_width()/show_min_height() and show_activate_width()/
> show_activate_height(), a divided error would be triggered if they are
> zero.
Fair point about the divide by zero. Would it be preferable to use real
values. As far as I know these devices all have logical dimensions of
9600x7200. Unfortunately both logical and physical are used as denominators,
so 1 for the physicals is probably sensible.
Rafi
>
> Signed-off-by: Wen-chien Jesse Sung <jesse.sung@canonical.com> ---
> drivers/hid/hid-ntrig.c | 8 ++++---- 1 file changed, 4 insertions(+), 4
> deletions(-)
>
> diff --git a/drivers/hid/hid-ntrig.c b/drivers/hid/hid-ntrig.c index
> 9fae2eb..86a969f 100644 --- a/drivers/hid/hid-ntrig.c +++
> b/drivers/hid/hid-ntrig.c @@ -882,10 +882,10 @@ static int
> ntrig_probe(struct hid_device *hdev, const struct hid_device_id *id)
> nd->activate_slack = activate_slack; nd->act_state = activate_slack;
> nd->deactivate_slack = -deactivate_slack; - nd->sensor_logical_width = 0; -
> nd->sensor_logical_height = 0; - nd->sensor_physical_width = 0; -
> nd->sensor_physical_height = 0; + nd->sensor_logical_width = 1; +
> nd->sensor_logical_height = 1; + nd->sensor_physical_width = 1; +
> nd->sensor_physical_height = 1;
>
> hid_set_drvdata(hdev, nd);
>
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.12 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
iQIcBAEBAgAGBQJQYZzbAAoJEPILXytRLnK2BSsQAKYxIDoQ8iaIIcHUw0s8mKr5
X1A6dP8LUgWqy0NyKvlfSKwcVra67XHjKWONpgHC3nEoVVxw14Kb41TjQPeBNZrS
Ua+NRH7v3kO+SaV6rS+ns3vGoY5zTlk3Ixbtso3XhF7PmM/BoOk93TNB136q61tx
JJgnLsusvjk+OWwrcTaBY2jb4aR6qUnUlz0VkaNdv4Da/Q0t3XBKRiaVfgFWk5PX
YyYUTDqK95/GHk/GF7ibU0FJz/H9imIHGfl/xxgiwt1KFaM2cKIfI4/2DRy1Wu4G
RRZ/++TeWUmonTAZnhrsHYchaYvnfobK5zK2TtkgGFQINCc6SaekAXEwfIHaA4wJ
VgYP40tT2WaMnpQO+lGCRMPdL6UBKHW0oRDYr6n/dk0KNw5rccIVxQ2a/PIX5Me9
u0dKQ35Fv4c1XoIpxSvZEjWnirbmhxTtT8Y5U4yd32H+Eic3tG73nhYApcuNvuzj
TNveK1iOgJCVOBX9/7byFVQKFTGWt3JyBo4FGqWbbmpAK6wMQbxRjcoC4u2bHp7r
B8/m+kGqBHzqGibDiJh56g/xbOz21fKnuQ4Kk1j5v6t2fyQbfmfR7LlRWK3qI8/O
yDhGIikrzEqIrwALI9idTRdJGBNsbhWu//VFll3xAVE29qbxzWF37xSwficyuCtc
Yg7IvGqcmn4S0ymCyTKx
=zBAE
-----END PGP SIGNATURE-----
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH resend] N-Trig: change default value of logical/physical width/height to 1
2012-09-25 12:00 ` Rafi Rubin
@ 2012-09-25 13:23 ` Jiri Kosina
2012-09-25 16:11 ` Jesse Sung
0 siblings, 1 reply; 5+ messages in thread
From: Jiri Kosina @ 2012-09-25 13:23 UTC (permalink / raw)
To: Rafi Rubin; +Cc: Jesse Sung, linux-input
On Tue, 25 Sep 2012, Rafi Rubin wrote:
> > Since something will be divided by these variables in
> > show_min_width()/show_min_height() and show_activate_width()/
> > show_activate_height(), a divided error would be triggered if they are
> > zero.
>
> Fair point about the divide by zero. Would it be preferable to use real
> values. As far as I know these devices all have logical dimensions of
> 9600x7200. Unfortunately both logical and physical are used as denominators,
> so 1 for the physicals is probably sensible.
Applied, thanks.
--
Jiri Kosina
SUSE Labs
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH resend] N-Trig: change default value of logical/physical width/height to 1
2012-09-25 13:23 ` Jiri Kosina
@ 2012-09-25 16:11 ` Jesse Sung
0 siblings, 0 replies; 5+ messages in thread
From: Jesse Sung @ 2012-09-25 16:11 UTC (permalink / raw)
To: Jiri Kosina; +Cc: Rafi Rubin, linux-input
2012/9/25 Jiri Kosina <jkosina@suse.cz>:
> On Tue, 25 Sep 2012, Rafi Rubin wrote:
>
>> > Since something will be divided by these variables in
>> > show_min_width()/show_min_height() and show_activate_width()/
>> > show_activate_height(), a divided error would be triggered if they are
>> > zero.
>>
>> Fair point about the divide by zero. Would it be preferable to use real
>> values. As far as I know these devices all have logical dimensions of
>> 9600x7200. Unfortunately both logical and physical are used as denominators,
>> so 1 for the physicals is probably sensible.
Rafi,
Thanks for your reply.
Should I change the value of logical (width, height) to (9600, 7200)
instead of (1, 1)?
> Applied, thanks.
Thank you Jiri. :)
Regards,
Jesse
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2012-09-25 16:11 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-09-18 8:27 [PATCH] N-Trig: change default value of logical/physical width/height to 1 Jesse Sung
2012-09-25 10:51 ` [PATCH resend] " Jesse Sung
2012-09-25 12:00 ` Rafi Rubin
2012-09-25 13:23 ` Jiri Kosina
2012-09-25 16:11 ` Jesse Sung
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).