X-Git-Url: https://git.openpandora.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;ds=sidebyside;f=drivers%2Fchar%2Fwatchdog%2Fmpcore_wdt.c;h=0d2b2773541980877c82def91e1eb28d47150d2d;hb=721e2629fa2167c0e5a9f10d704b1fee1621a8cb;hp=54b3c56ead0df8abdde728fe425a54ac9fc7661f;hpb=62322d2554d2f9680c8ace7bbf1f97d8fa84ad1a;p=pandora-kernel.git diff --git a/drivers/char/watchdog/mpcore_wdt.c b/drivers/char/watchdog/mpcore_wdt.c index 54b3c56ead0d..0d2b27735419 100644 --- a/drivers/char/watchdog/mpcore_wdt.c +++ b/drivers/char/watchdog/mpcore_wdt.c @@ -64,7 +64,7 @@ MODULE_PARM_DESC(mpcore_noboot, "MPcore watchdog action, set to 1 to ignore rebo * This is the interrupt handler. Note that we only use this * in testing mode, so don't actually do a reboot here. */ -static irqreturn_t mpcore_wdt_fire(int irq, void *arg, struct pt_regs *regs) +static irqreturn_t mpcore_wdt_fire(int irq, void *arg) { struct mpcore_wdt *wdt = arg; @@ -221,7 +221,7 @@ static int mpcore_wdt_ioctl(struct inode *inode, struct file *file, } uarg; if (_IOC_DIR(cmd) && _IOC_SIZE(cmd) > sizeof(uarg)) - return -ENOIOCTLCMD; + return -ENOTTY; if (_IOC_DIR(cmd) & _IOC_WRITE) { ret = copy_from_user(&uarg, (void __user *)arg, _IOC_SIZE(cmd)); @@ -271,7 +271,7 @@ static int mpcore_wdt_ioctl(struct inode *inode, struct file *file, break; default: - return -ENOIOCTLCMD; + return -ENOTTY; } if (ret == 0 && _IOC_DIR(cmd) & _IOC_READ) { @@ -328,12 +328,11 @@ static int __devinit mpcore_wdt_probe(struct platform_device *dev) goto err_out; } - wdt = kmalloc(sizeof(struct mpcore_wdt), GFP_KERNEL); + wdt = kzalloc(sizeof(struct mpcore_wdt), GFP_KERNEL); if (!wdt) { ret = -ENOMEM; goto err_out; } - memset(wdt, 0, sizeof(struct mpcore_wdt)); wdt->dev = &dev->dev; wdt->irq = platform_get_irq(dev, 0); @@ -347,7 +346,7 @@ static int __devinit mpcore_wdt_probe(struct platform_device *dev) goto err_free; } - mpcore_wdt_miscdev.dev = &dev->dev; + mpcore_wdt_miscdev.parent = &dev->dev; ret = misc_register(&mpcore_wdt_miscdev); if (ret) { dev_printk(KERN_ERR, _dev, "cannot register miscdev on minor=%d (err=%d)\n",