From: Jeff Garzik <jgarzik@mandrakesoft.com>
To: Marek Michalkiewicz <marekm@amelek.gda.pl>
Cc: torvalds@transmeta.com, linux-kernel@vger.kernel.org,
marekm@linux.org.pl
Subject: Re: [patch] 2.4.2 Advantech WDT driver
Date: Wed, 28 Feb 2001 12:37:46 -0500 [thread overview]
Message-ID: <3A9D376A.18F4E6F0@mandrakesoft.com> (raw)
In-Reply-To: <E14YAHv-0000Oq-00@mm.amelek.gda.pl>
Marek Michalkiewicz wrote:
> +static int
> +advwdt_close(struct inode *inode, struct file *file)
> +{
> + lock_kernel();
> + if (MINOR(inode->i_rdev) == WATCHDOG_MINOR) {
> + spin_lock(&advwdt_lock);
> +#ifndef CONFIG_WATCHDOG_NOWAYOUT
> + inb_p(WDT_STOP);
> +#endif
> + advwdt_is_open = 0;
> + spin_unlock(&advwdt_lock);
> + }
> + unlock_kernel();
> + return 0;
> +}
Why is lock_kernel necessary?
> +static int __init
> +advwdt_init(void)
> +{
> + printk("WDT driver for Advantech single board computer initialising.\n");
> +
> + spin_lock_init(&advwdt_lock);
> + misc_register(&advwdt_miscdev);
check return code for error
> +#if WDT_START != WDT_STOP
> + request_region(WDT_STOP, 1, "Advantech WDT");
> +#endif
> + request_region(WDT_START, 1, "Advantech WDT");
check return..
> + register_reboot_notifier(&advwdt_notifier);
ditto
--
Jeff Garzik | "You see, in this world there's two kinds of
Building 1024 | people, my friend: Those with loaded guns
MandrakeSoft | and those who dig. You dig." --Blondie
next prev parent reply other threads:[~2001-02-28 17:38 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2001-02-28 17:21 [patch] 2.4.2 Advantech WDT driver Marek Michalkiewicz
2001-02-28 17:37 ` Jeff Garzik [this message]
2001-03-03 13:38 ` Marek Michalkiewicz
2001-03-03 18:53 ` Jeff Garzik
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=3A9D376A.18F4E6F0@mandrakesoft.com \
--to=jgarzik@mandrakesoft.com \
--cc=linux-kernel@vger.kernel.org \
--cc=marekm@amelek.gda.pl \
--cc=marekm@linux.org.pl \
--cc=torvalds@transmeta.com \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.