public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Arnd Bergmann <arnd@arndb.de>
To: Wim Van Sebroeck <wim@iguana.be>
Cc: linux-kernel@vger.kernel.org
Subject: Re: watchdog infrastructure
Date: Mon, 5 Jul 2004 14:54:44 +0200	[thread overview]
Message-ID: <200407051454.48340.arnd@arndb.de> (raw)
In-Reply-To: <20040705093800.GB5726@infomag.infomag.iguana.be>

[-- Attachment #1: Type: text/plain, Size: 1320 bytes --]

On Montag, 5. Juli 2004 11:38, you wrote:
> Did you have a look allready at the different watchdog operations in 
> include/linux/watchdog.h ?

Yes, I already have a working driver, which does not use the
experimental infrastructure code. I'm just not allowed to
publish it until the hardware is available.

There are a couple of things I noticed about your new code:

- Is there any reason having an alloc_watchdogdev function in the
  common code? Simply statically allocating the structure in each
  device driver should be a lot simpler.
- Keeping watchdog_ops out of watchdog_device will simplify 
  the lifetime rules. Just put them in the same structure, add an
  owner field and get rid of the *private field.
- watchdog_is_open_sem can just be an atomic_t, you never
  actually down() it.
- You need to get the module reference count before calling any
  watchdog operation, the best place for this is probably the
  open() fop.
- Maybe its easier to always register the misc devices when
  watchdog.ko is loaded, and then deny opening them when no
  actual watchdog driver is registered to it.
- Why do you need seperate operations for start and keepalive?
- the reboot notifier and the nowayout parameter are probably
  common enough to be put into the generic module.

	Arnd <><

[-- Attachment #2: signature --]
[-- Type: application/pgp-signature, Size: 189 bytes --]

  reply	other threads:[~2004-07-05 12:55 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-07-01 17:23 watchdog infrastructure Arnd Bergmann
2004-07-05  9:38 ` Wim Van Sebroeck
2004-07-05 12:54   ` Arnd Bergmann [this message]
2004-07-12  8:19     ` Wim Van Sebroeck
2004-07-12  8:23       ` viro
2004-07-12 12:20         ` Arnd Bergmann
2004-07-12 13:04       ` Arnd Bergmann

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=200407051454.48340.arnd@arndb.de \
    --to=arnd@arndb.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=wim@iguana.be \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox