浏览代码

xen/hvc: only notify if we actually sent something

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>
Jeremy Fitzhardinge 14 年之前
父节点
当前提交
403a85ff00
共有 1 个文件被更改,包括 2 次插入1 次删除
  1. 2 1
      drivers/char/hvc_xen.c

+ 2 - 1
drivers/char/hvc_xen.c

@@ -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;
 }