From: Thiago Galesi Date: Sat, 29 Jul 2006 13:45:43 +0000 (-0300) Subject: USB: pl2303: cosmetic changes to pl2303_buf_{clear, data_avail} X-Git-Tag: v2.6.19-rc1~899^2~93 X-Git-Url: http://pileus.org/git/?a=commitdiff_plain;h=10a18cd1a31e34d123d5ae4736a3393432352750;p=~andy%2Flinux 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: Thiago Galesi Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/usb/serial/pl2303.c b/drivers/usb/serial/pl2303.c index 90d0e793566..0cd42bf4c6c 100644 --- a/drivers/usb/serial/pl2303.c +++ b/drivers/usb/serial/pl2303.c @@ -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); } /*