]> git.proxmox.com Git - mirror_ubuntu-artful-kernel.git/blobdiff - drivers/watchdog/mixcomwd.c
[WATCHDOG] watchdog_info constify
[mirror_ubuntu-artful-kernel.git] / drivers / watchdog / mixcomwd.c
index 2248a8187590a8168b7ead1951eccf108c9284bd..bc820d16699ab1df0f6ede8d55f052c5f2236043 100644 (file)
@@ -201,13 +201,17 @@ static long mixcomwd_ioctl(struct file *file,
        void __user *argp = (void __user *)arg;
        int __user *p = argp;
        int status;
-       static struct watchdog_info ident = {
+       static const struct watchdog_info ident = {
                .options = WDIOF_KEEPALIVEPING | WDIOF_MAGICCLOSE,
                .firmware_version = 1,
                .identity = "MixCOM watchdog",
        };
 
        switch (cmd) {
+       case WDIOC_GETSUPPORT:
+               if (copy_to_user(argp, &ident, sizeof(ident)))
+                       return -EFAULT;
+               break;
        case WDIOC_GETSTATUS:
                status = mixcomwd_opened;
                if (!nowayout)
@@ -215,10 +219,6 @@ static long mixcomwd_ioctl(struct file *file,
                return put_user(status, p);
        case WDIOC_GETBOOTSTATUS:
                return put_user(0, p);
-       case WDIOC_GETSUPPORT:
-               if (copy_to_user(argp, &ident, sizeof(ident)))
-                       return -EFAULT;
-               break;
        case WDIOC_KEEPALIVE:
                mixcomwd_ping();
                break;