@@ -604,22 +604,22 @@ bool comedi_is_subdevice_running(struct comedi_subdevice *s)
604
604
{
605
605
unsigned runflags = comedi_get_subdevice_runflags (s );
606
606
607
- return (runflags & SRF_RUNNING ) ? true : false;
607
+ return (runflags & COMEDI_SRF_RUNNING ) ? true : false;
608
608
}
609
609
EXPORT_SYMBOL_GPL (comedi_is_subdevice_running );
610
610
611
611
static bool comedi_is_subdevice_in_error (struct comedi_subdevice * s )
612
612
{
613
613
unsigned runflags = comedi_get_subdevice_runflags (s );
614
614
615
- return (runflags & SRF_ERROR ) ? true : false;
615
+ return (runflags & COMEDI_SRF_ERROR ) ? true : false;
616
616
}
617
617
618
618
static bool comedi_is_subdevice_idle (struct comedi_subdevice * s )
619
619
{
620
620
unsigned runflags = comedi_get_subdevice_runflags (s );
621
621
622
- return (runflags & ( SRF_ERROR | SRF_RUNNING ) ) ? false : true;
622
+ return (runflags & COMEDI_SRF_BUSY_MASK ) ? false : true;
623
623
}
624
624
625
625
/**
@@ -634,7 +634,7 @@ void *comedi_alloc_spriv(struct comedi_subdevice *s, size_t size)
634
634
{
635
635
s -> private = kzalloc (size , GFP_KERNEL );
636
636
if (s -> private )
637
- s -> runflags |= SRF_FREE_SPRIV ;
637
+ s -> runflags |= COMEDI_SRF_FREE_SPRIV ;
638
638
return s -> private ;
639
639
}
640
640
EXPORT_SYMBOL_GPL (comedi_alloc_spriv );
@@ -647,7 +647,7 @@ static void do_become_nonbusy(struct comedi_device *dev,
647
647
{
648
648
struct comedi_async * async = s -> async ;
649
649
650
- comedi_set_subdevice_runflags (s , SRF_RUNNING , 0 );
650
+ comedi_set_subdevice_runflags (s , COMEDI_SRF_RUNNING , 0 );
651
651
if (async ) {
652
652
comedi_buf_reset (s );
653
653
async -> inttrig = NULL ;
@@ -1634,10 +1634,13 @@ static int do_cmd_ioctl(struct comedi_device *dev,
1634
1634
if (async -> cmd .flags & CMDF_WAKE_EOS )
1635
1635
async -> cb_mask |= COMEDI_CB_EOS ;
1636
1636
1637
- comedi_set_subdevice_runflags (s , SRF_ERROR | SRF_RUNNING , SRF_RUNNING );
1637
+ comedi_set_subdevice_runflags (s , COMEDI_SRF_BUSY_MASK ,
1638
+ COMEDI_SRF_RUNNING );
1638
1639
1639
- /* set s->busy _after_ setting SRF_RUNNING flag to avoid race with
1640
- * comedi_read() or comedi_write() */
1640
+ /*
1641
+ * Set s->busy _after_ setting COMEDI_SRF_RUNNING flag to avoid
1642
+ * race with comedi_read() or comedi_write().
1643
+ */
1641
1644
s -> busy = file ;
1642
1645
ret = s -> do_cmd (dev , s );
1643
1646
if (ret == 0 )
@@ -2591,18 +2594,21 @@ void comedi_event(struct comedi_device *dev, struct comedi_subdevice *s)
2591
2594
return ;
2592
2595
2593
2596
if (s -> async -> events & COMEDI_CB_CANCEL_MASK )
2594
- runflags_mask |= SRF_RUNNING ;
2597
+ runflags_mask |= COMEDI_SRF_RUNNING ;
2595
2598
2596
2599
/*
2597
2600
* Remember if an error event has occurred, so an error
2598
2601
* can be returned the next time the user does a read().
2599
2602
*/
2600
2603
if (s -> async -> events & COMEDI_CB_ERROR_MASK ) {
2601
- runflags_mask |= SRF_ERROR ;
2602
- runflags |= SRF_ERROR ;
2604
+ runflags_mask |= COMEDI_SRF_ERROR ;
2605
+ runflags |= COMEDI_SRF_ERROR ;
2603
2606
}
2604
2607
if (runflags_mask ) {
2605
- /*sets SRF_ERROR and SRF_RUNNING together atomically */
2608
+ /*
2609
+ * Sets COMEDI_SRF_ERROR and COMEDI_SRF_RUNNING together
2610
+ * atomically.
2611
+ */
2606
2612
comedi_set_subdevice_runflags (s , runflags_mask , runflags );
2607
2613
}
2608
2614
0 commit comments