[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20080919224019.GC9675@flint.arm.linux.org.uk>
Date: Fri, 19 Sep 2008 23:40:19 +0100
From: Russell King - ARM Linux <linux@....linux.org.uk>
To: Felipe Balbi <felipe.balbi@...ia.com>
Cc: linux-kernel@...r.kernel.org, linux-omap@...r.kernel.org,
Tony Lindgren <tony@...mide.com>,
Wim Van Sebroeck <wim@...ana.be>,
Andrew Morton <akpm@...ux-foundation.org>,
"George G. Davis" <gdavis@...sta.com>
Subject: Re: [PATCH 1/5] watchdog: sync linux-omap changes
You're getting there with this patch, but still not completely up to
snuff.
On Fri, Sep 19, 2008 at 01:32:35PM +0300, Felipe Balbi wrote:
> diff --git a/drivers/watchdog/omap_wdt.c b/drivers/watchdog/omap_wdt.c
> index 3a11dad..e55f2cc 100644
> --- a/drivers/watchdog/omap_wdt.c
> +++ b/drivers/watchdog/omap_wdt.c
> @@ -39,6 +39,7 @@
> #include <linux/platform_device.h>
> #include <linux/moduleparam.h>
> #include <linux/clk.h>
> +
> #include <linux/bitops.h>
> #include <linux/io.h>
> #include <linux/uaccess.h>
This hunk is unnecessary.
> @@ -218,19 +240,18 @@ static long omap_wdt_ioctl(struct file *file, unsigned int cmd,
> return -EFAULT;
> omap_wdt_adjust_timeout(new_margin);
>
> - spin_lock(&wdt_lock);
> - omap_wdt_disable();
> - omap_wdt_set_timeout();
> - omap_wdt_enable();
> + omap_wdt_disable(wdev);
> + omap_wdt_set_timeout(wdev);
> + omap_wdt_enable(wdev);
>
> - omap_wdt_ping();
> - spin_unlock(&wdt_lock);
> + omap_wdt_ping(wdev);
This is removing the spin lock which should remain.
> /* Fall */
> case WDIOC_GETTIMEOUT:
> return put_user(timer_margin, (int __user *)arg);
> default:
> return -ENOTTY;
> }
> + return 0;
And this return statement shouldn't be required.
Apart from those three points, nice work.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists