Thread (7 messages) 7 messages, 2 authors, 2008-05-07

Re: [PATCH] Touch screen driver for the SuperH MigoR board V2

From: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Date: 2008-04-04 16:14:54
Also in: linux-sh

Hi Magnus,

On Fri, Apr 04, 2008 at 05:21:48PM +0900, Magnus Damm wrote:
I just tested using latest sh-2.6 git with evtest. Everything seems to
work well. The patch is much cleaner now. Please apply.
I was just looking the driver over one more time before applying it
and I think there is a race in migor_ts_remove():

+       /* cancel pending work and wait for migor_ts_poscheck() to finish */
+       cancel_delayed_work_sync(&priv->work);
+

What if interrupt comes here, before we got a chance to shut off the
device? IRQ is still enabled and it will schedule migor_ts_poscheck()
again. I think we need to call disable_irq() before canceling the work.
Since the driver does not support sharing IRQs that should be allright.
What do you think?

+       /* disable controller */
+       i2c_master_send(client, migor_ts_dis_seq, sizeof(migor_ts_dis_seq));
+
+       free_irq(priv->irq, priv);

Thank you.

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