Thread (5 messages) 5 messages, 3 authors, 2012-09-25

Re: [PATCH resend] N-Trig: change default value of logical/physical width/height to 1

From: Rafi Rubin <hidden>
Date: 2012-09-25 12:10:10

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 09/25/12 06:51, Jesse Sung wrote:
From: Wen-chien Jesse Sung <redacted>

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
quoted hunk ↗ jump to hunk
Signed-off-by: Wen-chien Jesse Sung <redacted> --- 
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-----
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help