aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/drivers/staging/comedi/comedi_fops.c
diff options
context:
space:
mode:
authorShyam Saini <mayhs11saini@gmail.com>2016-05-10 21:21:07 +0530
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2016-06-17 20:52:29 -0700
commit34d3473263250c4c0883d7d6d95e8f122d8d348d (patch)
tree91729db3a49bff39fd56e76758421a0ea2ef4eb1 /drivers/staging/comedi/comedi_fops.c
parentstaging: comedi: dt2811: update the MODULE_DESCRIPTION (diff)
downloadwireguard-linux-34d3473263250c4c0883d7d6d95e8f122d8d348d.tar.xz
wireguard-linux-34d3473263250c4c0883d7d6d95e8f122d8d348d.zip
Staging: comedi: comedi_fops.c: Fixed coding style issue
Fixed following checkpatch.pl warnings WARNING: Prefer WRITE_ONCE(<FOO>, <BAR>) over ACCESS_ONCE(<FOO>) = <BAR> WARNING: Prefer READ_ONCE(<FOO>) over ACCESS_ONCE(<FOO>) Signed-off-by: Shyam Saini <mayhs11saini@gmail.com> Reviewed-by: 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.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/drivers/staging/comedi/comedi_fops.c b/drivers/staging/comedi/comedi_fops.c
index 629080f39db0..4d87596137ed 100644
--- a/drivers/staging/comedi/comedi_fops.c
+++ b/drivers/staging/comedi/comedi_fops.c
@@ -312,8 +312,8 @@ static void comedi_file_reset(struct file *file)
}
cfp->last_attached = dev->attached;
cfp->last_detach_count = dev->detach_count;
- ACCESS_ONCE(cfp->read_subdev) = read_s;
- ACCESS_ONCE(cfp->write_subdev) = write_s;
+ WRITE_ONCE(cfp->read_subdev, read_s);
+ WRITE_ONCE(cfp->write_subdev, write_s);
}
static void comedi_file_check(struct file *file)
@@ -331,7 +331,7 @@ static struct comedi_subdevice *comedi_file_read_subdevice(struct file *file)
struct comedi_file *cfp = file->private_data;
comedi_file_check(file);
- return ACCESS_ONCE(cfp->read_subdev);
+ return READ_ONCE(cfp->read_subdev);
}
static struct comedi_subdevice *comedi_file_write_subdevice(struct file *file)
@@ -339,7 +339,7 @@ static struct comedi_subdevice *comedi_file_write_subdevice(struct file *file)
struct comedi_file *cfp = file->private_data;
comedi_file_check(file);
- return ACCESS_ONCE(cfp->write_subdev);
+ return READ_ONCE(cfp->write_subdev);
}
static int resize_async_buffer(struct comedi_device *dev,
@@ -1992,7 +1992,7 @@ static int do_setrsubd_ioctl(struct comedi_device *dev, unsigned long arg,
!(s_old->async->cmd.flags & CMDF_WRITE))
return -EBUSY;
- ACCESS_ONCE(cfp->read_subdev) = s_new;
+ WRITE_ONCE(cfp->read_subdev, s_new);
return 0;
}
@@ -2034,7 +2034,7 @@ static int do_setwsubd_ioctl(struct comedi_device *dev, unsigned long arg,
(s_old->async->cmd.flags & CMDF_WRITE))
return -EBUSY;
- ACCESS_ONCE(cfp->write_subdev) = s_new;
+ WRITE_ONCE(cfp->write_subdev, s_new);
return 0;
}