xen/hvc: only notify if we actually sent something
authorJeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>
Thu, 14 Oct 2010 18:38:47 +0000 (11:38 -0700)
committerJeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>
Fri, 22 Oct 2010 19:57:33 +0000 (12:57 -0700)
Don't spam dom0/xenconsoled with events unless we've actually added
something to the ring.

Signed-off-by: Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>
drivers/char/hvc_xen.c

index 60446f8..6b8e6d1 100644 (file)
@@ -74,7 +74,8 @@ static int __write_console(const char *data, int len)
        wmb();                  /* write ring before updating pointer */
        intf->out_prod = prod;
 
-       notify_daemon();
+       if (sent)
+               notify_daemon();
        return sent;
 }