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 <[EMAIL PROTECTED]>
---
Applies to 2.6.17
Index: linux-2.6.17/drivers/usb/serial/pl2303.c
===================================================================
--- linux-2.6.17.orig/drivers/usb/serial/pl2303.c
+++ linux-2.6.17/drivers/usb/serial/pl2303.c
@@ -1083,10 +1083,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);
}
@@ -1099,10 +1099,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);
}
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys -- and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
linux-usb-devel@lists.sourceforge.net
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel