diff options
author | H Hartley Sweeten | 2012-12-19 23:42:26 +0100 |
---|---|---|
committer | Greg Kroah-Hartman | 2013-01-07 23:25:48 +0100 |
commit | 74120719a70c984e04c16afe53dbdea868bed6da (patch) | |
tree | e65ce67bb386d76c3826213a13b46bf679f87e24 /drivers/staging/comedi/comedi_fops.c | |
parent | staging: comedi: comedi_fops: fix a number of sizeof(struct foo) forms (diff) | |
download | kernel-qcow2-linux-74120719a70c984e04c16afe53dbdea868bed6da.tar.gz kernel-qcow2-linux-74120719a70c984e04c16afe53dbdea868bed6da.tar.xz kernel-qcow2-linux-74120719a70c984e04c16afe53dbdea868bed6da.zip |
staging: comedi: comedi_fops: move comedi_get_subdevice_runflags()
For aesthetic reasons, move this function so its near
comedi_set_subdevice_runflags().
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>
Diffstat (limited to 'drivers/staging/comedi/comedi_fops.c')
-rw-r--r-- | drivers/staging/comedi/comedi_fops.c | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/drivers/staging/comedi/comedi_fops.c b/drivers/staging/comedi/comedi_fops.c index bc45c12e84d2..0161f94cd759 100644 --- a/drivers/staging/comedi/comedi_fops.c +++ b/drivers/staging/comedi/comedi_fops.c @@ -363,6 +363,18 @@ static void comedi_set_subdevice_runflags(struct comedi_subdevice *s, spin_unlock_irqrestore(&s->spin_lock, flags); } +unsigned comedi_get_subdevice_runflags(struct comedi_subdevice *s) +{ + unsigned long flags; + unsigned runflags; + + spin_lock_irqsave(&s->spin_lock, flags); + runflags = s->runflags; + spin_unlock_irqrestore(&s->spin_lock, flags); + return runflags; +} +EXPORT_SYMBOL(comedi_get_subdevice_runflags); + /* This function restores a subdevice to an idle state. */ @@ -2242,18 +2254,6 @@ void comedi_event(struct comedi_device *dev, struct comedi_subdevice *s) } EXPORT_SYMBOL(comedi_event); -unsigned comedi_get_subdevice_runflags(struct comedi_subdevice *s) -{ - unsigned long flags; - unsigned runflags; - - spin_lock_irqsave(&s->spin_lock, flags); - runflags = s->runflags; - spin_unlock_irqrestore(&s->spin_lock, flags); - return runflags; -} -EXPORT_SYMBOL(comedi_get_subdevice_runflags); - static void comedi_device_init(struct comedi_device *dev) { memset(dev, 0, sizeof(*dev)); |