]> xenbits.xensource.com Git - people/dariof/xen.git/commitdiff
xen/arm: vpl011: Add a new console_close_evtchn function in xenconsole
authorBhupinder Thakur <bhupinder.thakur@linaro.org>
Wed, 27 Sep 2017 06:13:29 +0000 (11:43 +0530)
committerStefano Stabellini <sstabellini@kernel.org>
Tue, 3 Oct 2017 22:23:37 +0000 (15:23 -0700)
This patch introduces a console_close_evtchn function. This function closes
the console event channel.

Signed-off-by: Bhupinder Thakur <bhupinder.thakur@linaro.org>
Reviewed-by: Stefano Stabellini <sstabellini@kernel.org>
Acked-by: Wei Liu <wei.liu2@citrix.com>
tools/console/daemon/io.c

index cfd727376c6696a0e1de91663948dac8f4561c39..71465a0c1ee70e0050e35881c5915ec949708eeb 100644 (file)
@@ -793,6 +793,14 @@ static void cleanup_domain(struct domain *d)
        remove_domain(d);
 }
 
+static void console_close_evtchn(struct console *con)
+{
+       if (con->xce_handle != NULL)
+               xenevtchn_close(con->xce_handle);
+
+       con->xce_handle = NULL;
+}
+
 static void shutdown_domain(struct domain *d)
 {
        struct console *con = &d->console;
@@ -800,9 +808,7 @@ static void shutdown_domain(struct domain *d)
        d->is_dead = true;
        watch_domain(d, false);
        console_unmap_interface(con);
-       if (con->xce_handle != NULL)
-               xenevtchn_close(con->xce_handle);
-       con->xce_handle = NULL;
+       console_close_evtchn(con);
 }
 
 static unsigned enum_pass = 0;