Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 353942
b: refs/heads/master
c: f012463
h: refs/heads/master
v: v3
  • Loading branch information
H Hartley Sweeten authored and Greg Kroah-Hartman committed Jan 7, 2013
1 parent 4c25467 commit d6d87fe
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: e0dac318ee2807d5ec1b09c1a608fdc25ef2ac7b
refs/heads/master: f012463068dbe0be2680aca6c607f7c6f5f0cdf3
14 changes: 7 additions & 7 deletions trunk/drivers/staging/comedi/comedi_fops.c
Original file line number Diff line number Diff line change
Expand Up @@ -409,7 +409,7 @@ static int do_cancel(struct comedi_device *dev, struct comedi_subdevice *s)
{
int ret = 0;

if ((comedi_get_subdevice_runflags(s) & SRF_RUNNING) && s->cancel)
if (comedi_is_subdevice_running(s) && s->cancel)
ret = s->cancel(dev, s);

do_become_nonbusy(dev, s);
Expand Down Expand Up @@ -660,7 +660,7 @@ static int do_subdinfo_ioctl(struct comedi_device *dev,
us->type = s->type;
us->n_chan = s->n_chan;
us->subd_flags = s->subdev_flags;
if (comedi_get_subdevice_runflags(s) & SRF_RUNNING)
if (comedi_is_subdevice_running(s))
us->subd_flags |= SDF_RUNNING;
#define TIMER_nanosec 5 /* backwards compatibility */
us->timer_type = TIMER_nanosec;
Expand Down Expand Up @@ -1852,7 +1852,7 @@ static unsigned int comedi_poll(struct file *file, poll_table *wait)
s = comedi_read_subdevice(info);
if (s) {
poll_wait(file, &s->async->wait_head, wait);
if (!s->busy || !(comedi_get_subdevice_runflags(s) & SRF_RUNNING) ||
if (!s->busy || !comedi_is_subdevice_running(s) ||
comedi_buf_read_n_available(s->async) > 0)
mask |= POLLIN | POLLRDNORM;
}
Expand All @@ -1863,7 +1863,7 @@ static unsigned int comedi_poll(struct file *file, poll_table *wait)

poll_wait(file, &s->async->wait_head, wait);
comedi_buf_write_alloc(s->async, s->async->prealloc_bufsz);
if (!s->busy || !(comedi_get_subdevice_runflags(s) & SRF_RUNNING) ||
if (!s->busy || !comedi_is_subdevice_running(s) ||
comedi_buf_write_n_allocated(s->async) >= bps)
mask |= POLLOUT | POLLWRNORM;
}
Expand Down Expand Up @@ -1907,7 +1907,7 @@ static ssize_t comedi_write(struct file *file, const char __user *buf,
while (nbytes > 0 && !retval) {
set_current_state(TASK_INTERRUPTIBLE);

if (!(comedi_get_subdevice_runflags(s) & SRF_RUNNING)) {
if (!comedi_is_subdevice_running(s)) {
if (count == 0) {
if (comedi_get_subdevice_runflags(s) &
SRF_ERROR) {
Expand Down Expand Up @@ -2014,7 +2014,7 @@ static ssize_t comedi_read(struct file *file, char __user *buf, size_t nbytes,
n = m;

if (n == 0) {
if (!(comedi_get_subdevice_runflags(s) & SRF_RUNNING)) {
if (!comedi_is_subdevice_running(s)) {
do_become_nonbusy(dev, s);
if (comedi_get_subdevice_runflags(s) &
SRF_ERROR) {
Expand Down Expand Up @@ -2227,7 +2227,7 @@ void comedi_event(struct comedi_device *dev, struct comedi_subdevice *s)

/* DPRINTK("comedi_event 0x%x\n",mask); */

if ((comedi_get_subdevice_runflags(s) & SRF_RUNNING) == 0)
if (!comedi_is_subdevice_running(s))
return;

if (s->
Expand Down
2 changes: 1 addition & 1 deletion trunk/drivers/staging/comedi/drivers/ni_mio_common.c
Original file line number Diff line number Diff line change
Expand Up @@ -1086,7 +1086,7 @@ static void handle_a_interrupt(struct comedi_device *dev, unsigned short status,
("ni_mio_common: a_status=0xffff. Card removed?\n");
/* we probably aren't even running a command now,
* so it's a good idea to be careful. */
if (comedi_get_subdevice_runflags(s) & SRF_RUNNING) {
if (comedi_is_subdevice_running(s)) {
s->async->events |=
COMEDI_CB_ERROR | COMEDI_CB_EOA;
ni_event(dev, s);
Expand Down

0 comments on commit d6d87fe

Please sign in to comment.