public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Andrew Morton <akpm@linux-foundation.org>
To: Mike Rapoport <mike@compulab.co.il>
Cc: joe@perches.com, wim@iguana.be, linux-kernel@vger.kernel.org,
	denis@compulab.co.il, mike@compulab.co.il, pazke@centrinvest.ru
Subject: Re: [PATCH v2] add SBC-FITPC2 watchdog driver
Date: Mon, 27 Jul 2009 14:10:24 -0700	[thread overview]
Message-ID: <20090727141024.5ea28817.akpm@linux-foundation.org> (raw)
In-Reply-To: <4A6594C9.4010403@compulab.co.il>

On Tue, 21 Jul 2009 13:13:29 +0300
Mike Rapoport <mike@compulab.co.il> wrote:

> > From: Denis Turischev <denis@compulab.co.il>
> 
> This patch adds support for watchdog found on SBC-FITPC2 board.
> 
> +/*
> + * Watchdog driver for SBC-FITPC2 board
> + *
> + * Author: Denis Turischev <denis@compulab.co.il>
> + *
> + * Adapted from the IXP2000 watchdog driver by Deepak Saxena.
> + *
> + * This file is licensed under  the terms of the GNU General Public
> + * License version 2. This program is licensed "as is" without any
> + * warranty of any kind, whether express or implied.
> + */
> +
> +#define pr_fmt(fmt) KBUILD_MODNAME " WATCHDOG: " fmt
> +
> +#include <linux/module.h>
> +#include <linux/types.h>
> +#include <linux/miscdevice.h>
> +#include <linux/watchdog.h>
> +#include <linux/ioport.h>
> +#include <linux/delay.h>
> +#include <linux/notifier.h>
> +#include <linux/fs.h>
> +#include <linux/reboot.h>
> +#include <linux/init.h>
> +#include <linux/moduleparam.h>
> +#include <linux/dmi.h>
> +
> +#include <linux/io.h>
> +#include <linux/uaccess.h>
> +#include <asm/system.h>
> +
> +static int nowayout = WATCHDOG_NOWAYOUT;
> +static unsigned int margin = 60;	/* (secs) Default is 1 minute */
> +static unsigned long wdt_status;
> +static spinlock_t wdt_lock;

You forgot to initialise the spinlock.

--- a/drivers/watchdog/sbc_fitpc2_wdt.c~watchdog-add-sbc-fitpc2-watchdog-driver-fix
+++ a/drivers/watchdog/sbc_fitpc2_wdt.c
@@ -32,7 +32,7 @@
 static int nowayout = WATCHDOG_NOWAYOUT;
 static unsigned int margin = 60;	/* (secs) Default is 1 minute */
 static unsigned long wdt_status;
-static spinlock_t wdt_lock;
+static DEFINE_SPINLOCK(wdt_lock);
 
 #define	WDT_IN_USE		0
 #define	WDT_OK_TO_CLOSE		1
_


  reply	other threads:[~2009-07-27 21:13 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-07-21 10:13 [PATCH v2] add SBC-FITPC2 watchdog driver Mike Rapoport
2009-07-27 21:10 ` Andrew Morton [this message]
2009-08-04 15:33 ` Wim Van Sebroeck
2009-08-06  8:34   ` Denis Turischev

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20090727141024.5ea28817.akpm@linux-foundation.org \
    --to=akpm@linux-foundation.org \
    --cc=denis@compulab.co.il \
    --cc=joe@perches.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mike@compulab.co.il \
    --cc=pazke@centrinvest.ru \
    --cc=wim@iguana.be \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox