From thiagogalesi@gmail.com Sat Jul 29 06:43:11 2006 To: greg@kroah.com Subject: USB: pl2303: cosmetic changes to pl2303_buf_{clear, data_avail} Date: Sat, 29 Jul 2006 10:45:43 -0300 Cc: linux-usb-devel@lists.sourceforge.net Message-Id: <200607291045.43283.tabgal@mandriva.com> From: Thiago Galesi 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 --- drivers/usb/serial/pl2303.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) --- gregkh-2.6.orig/drivers/usb/serial/pl2303.c +++ gregkh-2.6/drivers/usb/serial/pl2303.c @@ -1064,10 +1064,10 @@ static void pl2303_buf_clear(struct pl23 */ 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_avai */ 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); } /*