X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=drivers%2Fchar%2Fwatchdog%2Fwdt285.c;h=e4cf661dc890b4d05050e83a6191e6364986571e;hb=97bf2856c6014879bd04983a3e9dfcdac1e7fe85;hp=b61d9e1cc43f50f34d413557a377b83a20ea5913;hpb=5273a3df6485dc2ad6aa7ddd441b9a21970f003b;p=linux-2.6.git diff --git a/drivers/char/watchdog/wdt285.c b/drivers/char/watchdog/wdt285.c index b61d9e1cc..e4cf661dc 100644 --- a/drivers/char/watchdog/wdt285.c +++ b/drivers/char/watchdog/wdt285.c @@ -46,7 +46,7 @@ static unsigned long timer_alive; /* * If the timer expires.. */ -static void watchdog_fire(int irq, void *dev_id, struct pt_regs *regs) +static void watchdog_fire(int irq, void *dev_id) { printk(KERN_CRIT "Watchdog: Would Reboot.\n"); *CSR_TIMER4_CNTL = 0; @@ -97,6 +97,7 @@ static int watchdog_open(struct inode *inode, struct file *file) ret = 0; #endif + nonseekable_open(inode, file); return ret; } @@ -117,10 +118,6 @@ static int watchdog_release(struct inode *inode, struct file *file) static ssize_t watchdog_write(struct file *file, const char *data, size_t len, loff_t *ppos) { - /* Can't seek (pwrite) on this device */ - if (ppos != &file->f_pos) - return -ESPIPE; - /* * Refresh the timer. */ @@ -140,7 +137,7 @@ watchdog_ioctl(struct inode *inode, struct file *file, unsigned int cmd, unsigned long arg) { unsigned int new_margin; - int ret = -ENOIOCTLCMD; + int ret = -ENOTTY; switch(cmd) { case WDIOC_GETSUPPORT: @@ -181,8 +178,9 @@ watchdog_ioctl(struct inode *inode, struct file *file, unsigned int cmd, return ret; } -static struct file_operations watchdog_fops = { +static const struct file_operations watchdog_fops = { .owner = THIS_MODULE, + .llseek = no_llseek, .write = watchdog_write, .ioctl = watchdog_ioctl, .open = watchdog_open,