X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=drivers%2Fchar%2Fwatchdog%2Fixp4xx_wdt.c;h=5864bb865cfe542e0a93cb15e7003c2de572c8fd;hb=refs%2Fheads%2Fvserver;hp=b8e3d91d306669fc4e0d15ce00ee44d294da0daf;hpb=9bf4aaab3e101692164d49b7ca357651eb691cb6;p=linux-2.6.git diff --git a/drivers/char/watchdog/ixp4xx_wdt.c b/drivers/char/watchdog/ixp4xx_wdt.c index b8e3d91d3..5864bb865 100644 --- a/drivers/char/watchdog/ixp4xx_wdt.c +++ b/drivers/char/watchdog/ixp4xx_wdt.c @@ -1,5 +1,5 @@ /* - * drivers/watchdog/ixp4xx_wdt.c + * drivers/char/watchdog/ixp4xx_wdt.c * * Watchdog driver for Intel IXP4xx network processors * @@ -13,7 +13,6 @@ * warranty of any kind, whether express or implied. */ -#include #include #include #include @@ -22,16 +21,12 @@ #include #include #include +#include #include -#include #include -#ifdef CONFIG_WATCHDOG_NOWAYOUT -static int nowayout = 1; -#else -static int nowayout = 0; -#endif +static int nowayout = WATCHDOG_NOWAYOUT; static int heartbeat = 60; /* (secs) Default is 1 minute */ static unsigned long wdt_status; static unsigned long boot_status; @@ -107,7 +102,7 @@ static int ixp4xx_wdt_ioctl(struct inode *inode, struct file *file, unsigned int cmd, unsigned long arg) { - int ret = -ENOIOCTLCMD; + int ret = -ENOTTY; int time; switch (cmd) { @@ -156,7 +151,7 @@ ixp4xx_wdt_release(struct inode *inode, struct file *file) if (test_bit(WDT_OK_TO_CLOSE, &wdt_status)) { wdt_disable(); } else { - printk(KERN_CRIT "WATCHDOG: Device closed unexpectdly - " + printk(KERN_CRIT "WATCHDOG: Device closed unexpectedly - " "timer will not stop\n"); } @@ -167,9 +162,10 @@ ixp4xx_wdt_release(struct inode *inode, struct file *file) } -static struct file_operations ixp4xx_wdt_fops = +static const struct file_operations ixp4xx_wdt_fops = { .owner = THIS_MODULE, + .llseek = no_llseek, .write = ixp4xx_wdt_write, .ioctl = ixp4xx_wdt_ioctl, .open = ixp4xx_wdt_open, @@ -179,7 +175,7 @@ static struct file_operations ixp4xx_wdt_fops = static struct miscdevice ixp4xx_wdt_miscdev = { .minor = WATCHDOG_MINOR, - .name = "IXP4xx Watchdog", + .name = "watchdog", .fops = &ixp4xx_wdt_fops, }; @@ -189,8 +185,8 @@ static int __init ixp4xx_wdt_init(void) unsigned long processor_id; asm("mrc p15, 0, %0, cr0, cr0, 0;" : "=r"(processor_id) :); - if (!(processor_id & 0xf)) { - printk("IXP4XXX Watchdog: Rev. A0 CPU detected - " + if (!(processor_id & 0xf) && !cpu_is_ixp46x()) { + printk("IXP4XXX Watchdog: Rev. A0 IXP42x CPU detected - " "watchdog disabled\n"); return -ENODEV; @@ -215,7 +211,7 @@ static void __exit ixp4xx_wdt_exit(void) module_init(ixp4xx_wdt_init); module_exit(ixp4xx_wdt_exit); -MODULE_AUTHOR("Deepak Saxena ); +MODULE_AUTHOR("Deepak Saxena "); MODULE_DESCRIPTION("IXP4xx Network Processor Watchdog"); module_param(heartbeat, int, 0);