X-Git-Url: http://pilppa.org/gitweb/?a=blobdiff_plain;f=drivers%2Fwatchdog%2Fbfin_wdt.c;h=067a57cb3f829baf263a9d92f8b345a566c639cc;hb=36609469c8278554b046aa4cc9a5fa9ccea35306;hp=2b92818cc66452806782daa89e05eab228aace17;hpb=96e2e6fafaedd83bd899f682907e14d1eec17390;p=linux-2.6-omap-h63xx.git diff --git a/drivers/watchdog/bfin_wdt.c b/drivers/watchdog/bfin_wdt.c index 2b92818cc66..067a57cb3f8 100644 --- a/drivers/watchdog/bfin_wdt.c +++ b/drivers/watchdog/bfin_wdt.c @@ -5,7 +5,7 @@ * Originally based on softdog.c * Copyright 2006-2007 Analog Devices Inc. * Copyright 2006-2007 Michele d'Amico - * Copyright 1996 Alan Cox + * Copyright 1996 Alan Cox * * Enter bugs at http://blackfin.uclinux.org/ * @@ -24,8 +24,8 @@ #include #include #include -#include #include +#include #define stamp(fmt, args...) pr_debug("%s:%i: " fmt "\n", __func__, __LINE__, ## args) #define stampit() stamp("here i am") @@ -265,20 +265,6 @@ static long bfin_wdt_ioctl(struct file *file, case WDIOC_GETSTATUS: case WDIOC_GETBOOTSTATUS: return put_user(!!(_bfin_swrst & SWRST_RESET_WDOG), p); - case WDIOC_KEEPALIVE: - bfin_wdt_keepalive(); - return 0; - case WDIOC_SETTIMEOUT: { - int new_timeout; - - if (get_user(new_timeout, p)) - return -EFAULT; - if (bfin_wdt_set_timeout(new_timeout)) - return -EINVAL; - } - /* Fall */ - case WDIOC_GETTIMEOUT: - return put_user(timeout, p); case WDIOC_SETOPTIONS: { unsigned long flags; int options, ret = -EINVAL; @@ -298,6 +284,20 @@ static long bfin_wdt_ioctl(struct file *file, spin_unlock_irqrestore(&bfin_wdt_spinlock, flags); return ret; } + case WDIOC_KEEPALIVE: + bfin_wdt_keepalive(); + return 0; + case WDIOC_SETTIMEOUT: { + int new_timeout; + + if (get_user(new_timeout, p)) + return -EFAULT; + if (bfin_wdt_set_timeout(new_timeout)) + return -EINVAL; + } + /* Fall */ + case WDIOC_GETTIMEOUT: + return put_user(timeout, p); default: return -ENOTTY; }