From: Amit Shah Date: Wed, 14 Sep 2011 07:36:43 +0000 (+0530) Subject: virtio: console: make get_inbuf() return port->inbuf if present X-Git-Tag: v3.2-rc1~83^2~7 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d25a9ddae93ca97aa03fdab1363baf0e0c35d960;p=pandora-kernel.git virtio: console: make get_inbuf() return port->inbuf if present Instead of pulling in a buffer from the vq each time it's called, get_inbuf() now checks if the current active buffer, in port->inbuf is valid. If it is, just returns a pointer to it. This ends up simplifying a lot of code calling get_inbuf() since the check for port->inbuf being valid was done by all the callers. Signed-off-by: Amit Shah Signed-off-by: Rusty Russell --- Reading git-diff-tree failed