projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
54fceca
)
[media] lirc_dev: do not use goto to create loops
author
Andi Shyti
<
[email protected]
>
Wed, 6 Jul 2016 09:01:18 +0000
(06:01 -0300)
committer
Mauro Carvalho Chehab
<
[email protected]
>
Wed, 13 Jul 2016 18:01:13 +0000
(15:01 -0300)
... use "do .. while" instead.
Signed-off-by: Andi Shyti <
[email protected]
>
Signed-off-by: Mauro Carvalho Chehab <
[email protected]
>
drivers/media/rc/lirc_dev.c
patch
|
blob
|
history
diff --git
a/drivers/media/rc/lirc_dev.c
b/drivers/media/rc/lirc_dev.c
index b11d02682d135ceeed5c60b863ca463f870079dc..cfa6031eeb722cd6fb4dbff59fd9f4a104ee0121 100644
(file)
--- a/
drivers/media/rc/lirc_dev.c
+++ b/
drivers/media/rc/lirc_dev.c
@@
-99,18
+99,16
@@
static int lirc_add_to_buf(struct irctl *ir)
{
if (ir->d.add_to_buf) {
int res = -ENODATA;
- int got_data =
0
;
+ int got_data =
-1
;
/*
* service the device as long as it is returning
* data and we have space
*/
-get_data:
- res = ir->d.add_to_buf(ir->d.data, ir->buf);
- if (res == 0) {
+ do {
got_data++;
-
goto get_data
;
- }
+
res = ir->d.add_to_buf(ir->d.data, ir->buf)
;
+ }
while (!res);
if (res == -ENODEV)
kthread_stop(ir->task);