From: davej@codemonkey.org.uk
To: torvalds@transmeta.com
Cc: linux-kernel@vger.kernel.org, davem@redhat.com
Subject: bring sparc riowatchdog in sync with 2.4
Date: Mon, 24 Mar 2003 16:41:52 +0000 [thread overview]
Message-ID: <200303241642.h2OGg535008281@deviant.impure.org.uk> (raw)
+ C99 struct initialisers
diff -urpN --exclude-from=/home/davej/.exclude bk-linus/drivers/sbus/char/riowatchdog.c linux-2.5/drivers/sbus/char/riowatchdog.c
--- bk-linus/drivers/sbus/char/riowatchdog.c 2003-03-08 09:57:23.000000000 +0000
+++ linux-2.5/drivers/sbus/char/riowatchdog.c 2003-03-17 23:42:32.000000000 +0000
@@ -1,4 +1,4 @@
-/* $Id: riowatchdog.c,v 1.3 2001/10/08 22:19:51 davem Exp $
+/* $Id: riowatchdog.c,v 1.3.2.2 2002/01/23 18:48:02 davem Exp $
* riowatchdog.c - driver for hw watchdog inside Super I/O of RIO
*
* Copyright (C) 2001 David S. Miller (davem@redhat.com)
@@ -127,8 +127,11 @@ static int riowd_release(struct inode *i
static int riowd_ioctl(struct inode *inode, struct file *filp,
unsigned int cmd, unsigned long arg)
{
- static struct watchdog_info info = { 0, 0, "Natl. Semiconductor PC97317" };
+ static struct watchdog_info info = {
+ WDIOF_SETTIMEOUT, 0, "Natl. Semiconductor PC97317"
+ };
unsigned int options;
+ int new_margin;
switch (cmd) {
case WDIOC_GETSUPPORT:
@@ -159,6 +162,18 @@ static int riowd_ioctl(struct inode *ino
break;
+ case WDIOC_SETTIMEOUT:
+ if (get_user(new_margin, (int *)arg))
+ return -EFAULT;
+ if ((new_margin < 60) || (new_margin > (255 * 60)))
+ return -EINVAL;
+ riowd_timeout = (new_margin + 59) / 60;
+ riowd_pingtimer();
+ /* Fall */
+
+ case WDIOC_GETTIMEOUT:
+ return put_user(riowd_timeout * 60, (int *)arg);
+
default:
return -EINVAL;
};
reply other threads:[~2003-03-24 17:04 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=200303241642.h2OGg535008281@deviant.impure.org.uk \
--to=davej@codemonkey.org.uk \
--cc=davem@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®