* [PATCH 1/1] comedi: adv_pci1710: Simply for (; cond;) to while (cond)
@ 2024-07-31 9:55 Ilpo Järvinen
0 siblings, 0 replies; only message in thread
From: Ilpo Järvinen @ 2024-07-31 9:55 UTC (permalink / raw)
To: Ian Abbott, H Hartley Sweeten, linux-kernel; +Cc: Ilpo Järvinen
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 <ilpo.jarvinen@linux.intel.com>
---
drivers/comedi/drivers/adv_pci1710.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/comedi/drivers/adv_pci1710.c b/drivers/comedi/drivers/adv_pci1710.c
index c49b0f1f5228..f20399fcc98a 100644
--- a/drivers/comedi/drivers/adv_pci1710.c
+++ b/drivers/comedi/drivers/adv_pci1710.c
@@ -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;
--
2.39.2
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2024-07-31 9:55 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-07-31 9:55 [PATCH 1/1] comedi: adv_pci1710: Simply for (; cond;) to while (cond) Ilpo Järvinen
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®