watchdog: omap_wdt.c: fix the WDIOC_GETBOOTSTATUS ioctl if not implemented.
authorShubhrajyoti D <shubhrajyoti@ti.com>
Wed, 4 Jan 2012 14:15:28 +0000 (19:45 +0530)
committerWim Van Sebroeck <wim@iguana.be>
Fri, 6 Jan 2012 15:33:31 +0000 (16:33 +0100)
WDIOC_GETBOOTSTATUS ioctl is imlemented for cpu_is_omap16xx and cpu_is_omap24xx
cpus only. For other cpus it falls through to WDIOC_KEEPALIVE.
This patch prevents the fall through.

Cc: sricharan <r.sricharan@ti.com>
Signed-off-by: Shubhrajyoti D <shubhrajyoti@ti.com>
Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
drivers/watchdog/omap_wdt.c

index 324f525ea8d2e8bef22e0172449da4851e003ab2..4b33e3fd726bb4b2664dbc3c8ff66d0cef71be3d 100644 (file)
@@ -232,6 +232,7 @@ static long omap_wdt_ioctl(struct file *file, unsigned int cmd,
                if (cpu_is_omap24xx())
                        return put_user(omap_prcm_get_reset_sources(),
                                        (int __user *)arg);
+               return put_user(0, (int __user *)arg);
        case WDIOC_KEEPALIVE:
                pm_runtime_get_sync(wdev->dev);
                spin_lock(&wdt_lock);