From: Bhupinder Thakur Date: Wed, 27 Sep 2017 06:13:29 +0000 (+0530) Subject: xen/arm: vpl011: Add a new console_close_evtchn function in xenconsole X-Git-Tag: archive/raspbian/4.11.1-1+rpi1~1^2~66^2~1246 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=2006b2fc4636d3a14ecc7b25614a1edb54078f69;p=xen.git xen/arm: vpl011: Add a new console_close_evtchn function in xenconsole This patch introduces a console_close_evtchn function. This function closes the console event channel. Signed-off-by: Bhupinder Thakur Reviewed-by: Stefano Stabellini Acked-by: Wei Liu --- diff --git a/tools/console/daemon/io.c b/tools/console/daemon/io.c index cfd727376c..71465a0c1e 100644 --- a/tools/console/daemon/io.c +++ b/tools/console/daemon/io.c @@ -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;