comedi: adv_pci1710: Simply for (; cond;) to while (cond)
PATCH 1/1 comedi: adv_pci1710: Simply for (; cond;) to while (cond)
pci1710_handle_every_sample() has a for () loop that only defines condition so it can be converted to while () which makes the code easier to follow.
Signed-off-by Ilpo Järvinen <[email protected]>
--- drivers/comedi/drivers/adv_pci1710.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/comedi/drivers/adv_pci1710.c +1 -1
@@ -412,7 +412,7 @@ static void pci1710_handle_every_sample(struct comedi_device *dev,outb (0 , dev->iobase +PCI171X_CLRINT_REG ); -for (; !(inw (dev->iobase +PCI171X_STATUS_REG ) &PCI171X_STATUS_FE );) { +while (!(inw (dev->iobase +PCI171X_STATUS_REG ) &PCI171X_STATUS_FE )) { ret =pci1710_ai_read_sample (dev, s, s->async->cur_chan, &val);if (ret) { s->async->events |=COMEDI_CB_ERROR ;
Signature · 1 line
2.39.2