提交 10a18cd1 编写于 作者: T Thiago Galesi 提交者: Greg Kroah-Hartman

USB: pl2303: cosmetic changes to pl2303_buf_{clear, data_avail}

Changes the functions pl2303_buf_clear and pl2303_buf_data_avail for
the purpose of keeping them under the 80 column limit, making them
more similar to similar functions and making then simpler.
Signed-off-by: NThiago Galesi <thiagogalesi@gmail.com>
Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
上级 372db8a7
......@@ -1064,10 +1064,10 @@ static void pl2303_buf_clear(struct pl2303_buf *pb)
*/
static unsigned int pl2303_buf_data_avail(struct pl2303_buf *pb)
{
if (pb != NULL)
return ((pb->buf_size + pb->buf_put - pb->buf_get) % pb->buf_size);
else
if (pb == NULL)
return 0;
return ((pb->buf_size + pb->buf_put - pb->buf_get) % pb->buf_size);
}
/*
......@@ -1078,10 +1078,10 @@ static unsigned int pl2303_buf_data_avail(struct pl2303_buf *pb)
*/
static unsigned int pl2303_buf_space_avail(struct pl2303_buf *pb)
{
if (pb != NULL)
return ((pb->buf_size + pb->buf_get - pb->buf_put - 1) % pb->buf_size);
else
if (pb == NULL)
return 0;
return ((pb->buf_size + pb->buf_get - pb->buf_put - 1) % pb->buf_size);
}
/*
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册