syscall_other: add support for suspend/resume
authorAlan Cox <alan@linux.intel.com>
Thu, 20 Sep 2018 00:53:50 +0000 (01:53 +0100)
committerAlan Cox <alan@linux.intel.com>
Thu, 20 Sep 2018 00:53:50 +0000 (01:53 +0100)
Kernel/syscall_other.c

index ead1e2c..e735779 100644 (file)
@@ -541,7 +541,14 @@ arg_t _uadmin(void)
        }
        if (cmd == A_REBOOT)
                platform_reboot();
-
+#ifdef CONFIG_PLATFORM_SUSPEND
+       if (cmd == A_SUSPEND) {
+               udata.u_error = platform_suspend();
+               if (udata.u_error)
+                       return -1;
+               return 0;
+       }
+#endif
        /* We don't do SWAPCTL yet */
        udata.u_error = EINVAL;
        return -1;