lkml.org 
[lkml]   [2008]   [Jun]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: AT91SAM9/CAP9 watchdog driver
On Sun, 1 Jun 2008 18:40:46 +0200
"Andrew Victor" <avictor.za@gmail.com> wrote:

> +static int __init at91wdt_probe(struct platform_device *pdev)
> +{
> + int res;
> +
> + if (at91wdt_miscdev.parent)
> + return -EBUSY;
> + at91wdt_miscdev.parent = &pdev->dev;
> +
> + res = misc_register(&at91wdt_miscdev);
> + if (res)
> + return res;
> +
> + /* Set watchdog */
> + if (at91_wdt_settimeout(wdt_timeout) == -EINVAL) {
> + pr_info("at91sam9_wdt: timeout must be between 1 and %d.\n",
> + WDT_MAX_TIME);

Would printk(KERN_ERR be more appropriate here?

> + return 0;

That looks like the wrong return value?

> + }
> +
> + return 0;
> +}


\
 
 \ /
  Last update: 2008-06-03 23:27    [W:0.765 / U:0.032 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site