commit | d25a9ddae93ca97aa03fdab1363baf0e0c35d960 | [log] [tgz] |
---|---|---|
author | Amit Shah <amit.shah@redhat.com> | Wed Sep 14 13:06:43 2011 +0530 |
committer | Rusty Russell <rusty@rustcorp.com.au> | Wed Nov 02 11:41:00 2011 +1030 |
tree | fea9bd4041716248fdfd8db78bab715f1d907670 | |
parent | defde66996476295dc7b1b60ea318965f8c3ad86 [diff] |
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 <amit.shah@redhat.com> Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>