aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/serial
diff options
context:
space:
mode:
authorThiago Galesi <thiagogalesi@gmail.com>2006-07-29 09:45:43 -0400
committerGreg Kroah-Hartman <gregkh@suse.de>2006-09-27 14:58:51 -0400
commit10a18cd1a31e34d123d5ae4736a3393432352750 (patch)
tree462df0ea45a3120224c6bcd43192f95f44d9825b /drivers/usb/serial
parent372db8a780f63368c6960a167b7a19aad776d704 (diff)
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 <thiagogalesi@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/usb/serial')
-rw-r--r--drivers/usb/serial/pl2303.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/drivers/usb/serial/pl2303.c b/drivers/usb/serial/pl2303.c
index 90d0e7935665..0cd42bf4c6c8 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)
1064 */ 1064 */
1065static unsigned int pl2303_buf_data_avail(struct pl2303_buf *pb) 1065static unsigned int pl2303_buf_data_avail(struct pl2303_buf *pb)
1066{ 1066{
1067 if (pb != NULL) 1067 if (pb == NULL)
1068 return ((pb->buf_size + pb->buf_put - pb->buf_get) % pb->buf_size);
1069 else
1070 return 0; 1068 return 0;
1069
1070 return ((pb->buf_size + pb->buf_put - pb->buf_get) % pb->buf_size);
1071} 1071}
1072 1072
1073/* 1073/*
@@ -1078,10 +1078,10 @@ static unsigned int pl2303_buf_data_avail(struct pl2303_buf *pb)
1078 */ 1078 */
1079static unsigned int pl2303_buf_space_avail(struct pl2303_buf *pb) 1079static unsigned int pl2303_buf_space_avail(struct pl2303_buf *pb)
1080{ 1080{
1081 if (pb != NULL) 1081 if (pb == NULL)
1082 return ((pb->buf_size + pb->buf_get - pb->buf_put - 1) % pb->buf_size);
1083 else
1084 return 0; 1082 return 0;
1083
1084 return ((pb->buf_size + pb->buf_get - pb->buf_put - 1) % pb->buf_size);
1085} 1085}
1086 1086
1087/* 1087/*