Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit a86b8498 authored by Alan Cox's avatar Alan Cox Committed by Wim Van Sebroeck
Browse files

[WATCHDOG 29/57] mv64x60_wdt: clean up and locking checks



Review and switch to unlocked_ioctl

Signed-off-by: default avatarAlan Cox <alan@redhat.com>
Signed-off-by: default avatarWim Van Sebroeck <wim@iguana.be>
parent ed78c2da
Loading
Loading
Loading
Loading
+11 −9
Original line number Original line Diff line number Diff line
@@ -24,8 +24,8 @@
#include <linux/platform_device.h>
#include <linux/platform_device.h>


#include <linux/mv643xx.h>
#include <linux/mv643xx.h>
#include <asm/uaccess.h>
#include <linux/uaccess.h>
#include <asm/io.h>
#include <linux/io.h>


#define MV64x60_WDT_WDC_OFFSET	0
#define MV64x60_WDT_WDC_OFFSET	0


@@ -61,7 +61,9 @@ static DEFINE_SPINLOCK(mv64x60_wdt_spinlock);


static int nowayout = WATCHDOG_NOWAYOUT;
static int nowayout = WATCHDOG_NOWAYOUT;
module_param(nowayout, int, 0);
module_param(nowayout, int, 0);
MODULE_PARM_DESC(nowayout, "Watchdog cannot be stopped once started (default=" __MODULE_STRING(WATCHDOG_NOWAYOUT) ")");
MODULE_PARM_DESC(nowayout,
		"Watchdog cannot be stopped once started (default="
				__MODULE_STRING(WATCHDOG_NOWAYOUT) ")");


static int mv64x60_wdt_toggle_wdc(int enabled_predicate, int field_shift)
static int mv64x60_wdt_toggle_wdc(int enabled_predicate, int field_shift)
{
{
@@ -172,7 +174,7 @@ static ssize_t mv64x60_wdt_write(struct file *file, const char __user *data,
	return len;
	return len;
}
}


static int mv64x60_wdt_ioctl(struct inode *inode, struct file *file,
static long mv64x60_wdt_ioctl(struct file *file,
					unsigned int cmd, unsigned long arg)
					unsigned int cmd, unsigned long arg)
{
{
	int timeout;
	int timeout;
@@ -240,7 +242,7 @@ static const struct file_operations mv64x60_wdt_fops = {
	.owner = THIS_MODULE,
	.owner = THIS_MODULE,
	.llseek = no_llseek,
	.llseek = no_llseek,
	.write = mv64x60_wdt_write,
	.write = mv64x60_wdt_write,
	.ioctl = mv64x60_wdt_ioctl,
	.unlocked_ioctl = mv64x60_wdt_ioctl,
	.open = mv64x60_wdt_open,
	.open = mv64x60_wdt_open,
	.release = mv64x60_wdt_release,
	.release = mv64x60_wdt_release,
};
};