lkml.org 
[lkml]   [2011]   [Jun]   [22]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 1/10 v2] Generic Watchdog Timer Driver
On Sat, Jun 18, 2011 at 08:58:14PM +0200, Arnd Bergmann wrote:
> On Saturday 18 June 2011 19:19:46 Wim Van Sebroeck wrote:

> > +static DEFINE_TIMER(timer, wdt_timer_tick, 0, 0);
> > + /* The timer that pings the watchdog */
> > +static unsigned long next_heartbeat; /* the next_heartbeat for the timer */
> > +static unsigned long running; /* is watchdog running for userspace? */

> How about moving these into a structure that hangs off watchdog_device->priv?
> It would be nice if a driver could live without global variables, especially
> if you want to eventually support multiple concurrent watchdog instances.

Yes, please - even if we can only support a single watchdog at once it'd
be helpful if the common code took care of that limitation and drivers
mould be implemented with support for multiple watchdogs. It'll be less
work when the core does get this support and until then it means that
drivers don't need to worry about it.


\
 
 \ /
  Last update: 2011-06-22 14:27    [W:0.192 / U:0.392 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site