8250-serial: Simplify is_readable function

Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
This commit is contained in:
Cyrill Gorcunov
2015-06-01 16:39:41 +01:00
committed by Will Deacon
parent 176db3d6c9
commit 6d54df7482
+4 -8
View File
@@ -92,16 +92,12 @@ static int read_char(int fd)
static bool is_readable(int fd)
{
struct pollfd pollfd;
int err;
pollfd = (struct pollfd) {
.fd = fd,
.events = POLLIN,
struct pollfd pollfd = (struct pollfd) {
.fd = fd,
.events = POLLIN,
};
err = poll(&pollfd, 1, 0);
return err > 0;
return poll(&pollfd, 1, 0) > 0;
}
void serial8250__interrupt(struct kvm *self)