Thread (7 messages) 7 messages, 3 authors, 2009-05-20

Re: [PATCH 3/3] hid: Multitouch support for the N-Trig touchscreen

From: Jiri Kosina <hidden>
Date: 2009-05-20 11:00:24

[ BTW, in all your mails you have @suze.cz as my recepient domain, but 
  it's in fact @suse.cz, you must be getting bounces for that one :) ]

On Tue, 19 May 2009, Stéphane Chatty wrote:
quoted
quoted
+	static __s32 x, y, id, w, h;
+	static char reading_a_point = 0, found_contact_id = 0;
+	struct input_dev *input = field->hidinput->input;
Why are these variables static? This will break horribly if multiple 
devices are connected to the system, right?
You're right. But so far these devices are sold only as embedded in a 
notebook, and I doubt we will see standalone devices in the near future. 
Do you think it is worth planning ahead for this eventuality?
But we should at least be consistent. So at least the driver should 
explicitly check whether it is driving more than one device, and if so, 
report that this is unsupported configuration.

But I would really prefer doing this cleanly from the start (let's say 
allocating per-device structure during probe and storing all these data in 
it, let's say). 

Would that be possible please?

Thanks,

-- 
Jiri Kosina
SUSE Labs
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help