mirror of
https://github.com/edk2-porting/linux-next.git
synced 2024-12-26 14:14:01 +08:00
staging: comedi: comedi_fops: introduce comedi_is_subdevice_running()
Introduce a helper function that checks the subdevice runflags to see if the subdevice is running a command. Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Cc: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
74120719a7
commit
e0dac318ee
@ -375,6 +375,14 @@ unsigned comedi_get_subdevice_runflags(struct comedi_subdevice *s)
|
||||
}
|
||||
EXPORT_SYMBOL(comedi_get_subdevice_runflags);
|
||||
|
||||
bool comedi_is_subdevice_running(struct comedi_subdevice *s)
|
||||
{
|
||||
unsigned runflags = comedi_get_subdevice_runflags(s);
|
||||
|
||||
return (runflags & SRF_RUNNING) ? true : false;
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(comedi_is_subdevice_running);
|
||||
|
||||
/*
|
||||
This function restores a subdevice to an idle state.
|
||||
*/
|
||||
|
@ -362,6 +362,8 @@ enum subdevice_runflags {
|
||||
SRF_RUNNING = 0x08000000
|
||||
};
|
||||
|
||||
bool comedi_is_subdevice_running(struct comedi_subdevice *s);
|
||||
|
||||
int comedi_check_chanlist(struct comedi_subdevice *s,
|
||||
int n,
|
||||
unsigned int *chanlist);
|
||||
|
Loading…
Reference in New Issue
Block a user