Messages in this thread | | | Date | Wed, 1 Nov 2006 00:24:17 +0000 | From | "Miguel Ojeda" <> | Subject | Re: [PATCH update5] drivers: add LCD support |
| |
On 10/31/06, Andrew Morton <akpm@osdl.org> wrote: > On Wed, 1 Nov 2006 00:37:48 +0000 > Miguel Ojeda Sandonis <maxextreme@gmail.com> wrote: > > > Andrew, here it is the fifth update for the drivers-add-lcd-support. > > It does queue_delayed_work(), but forgot to do cancel_delayed_work(). If > the timer is still pending after module unload, deadly things will happen. >
Hum, I call cancel_delayed_work() as well as flush_workqueue() at module exit:
static void __exit cfag12864b_exit(void) { ... + cfag12864b_disable(); ... }
And cfag12864b_disable() will call them, as fast as the mutex is unlocked (in fact, modules must call cfag12864b_disable() when they finish working with the LCD, as cfag12864bfb, for example, does, but just for be safe, I called it at module unload in cfag12864b. If it is already disabled, it won't hurt in any way.)
Is that right?
> There's a lot of "if(" in there. Usual kernel style is "if (". >
Excuse me, will fix in a few moments. - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
| |