Commit 3b6b25b5ddf4485e89432a35a7d79d371ba6eba1
1 parent
2434358ac7
Exists in
master
and in
7 other branches
Staging: comedi: range.c: properly mark up __user pointers
This is the start of cleaning up the user pointer markings in the comedi core. Cc: Ian Abbott <abbotti@mev.co.uk> Cc: Frank Mori Hess <fmhess@users.sourceforge.net> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Showing 5 changed files with 10 additions and 8 deletions Side-by-side Diff
drivers/staging/comedi/comedi.h
drivers/staging/comedi/comedi_compat32.c
drivers/staging/comedi/drivers/comedi_bond.c
... | ... | @@ -87,11 +87,11 @@ |
87 | 87 | * options that are used with comedi_config. |
88 | 88 | */ |
89 | 89 | |
90 | +#include <linux/string.h> | |
91 | +#include <linux/slab.h> | |
90 | 92 | #include "../comedi.h" |
91 | 93 | #include "../comedilib.h" |
92 | 94 | #include "../comedidev.h" |
93 | -#include <linux/string.h> | |
94 | -#include <linux/slab.h> | |
95 | 95 | |
96 | 96 | /* The maxiumum number of channels per subdevice. */ |
97 | 97 | #define MAX_CHANS 256 |
drivers/staging/comedi/internal.h
1 | 1 | /* |
2 | 2 | * various internal comedi functions |
3 | 3 | */ |
4 | -int do_rangeinfo_ioctl(struct comedi_device *dev, struct comedi_rangeinfo *arg); | |
4 | +int do_rangeinfo_ioctl(struct comedi_device *dev, | |
5 | + struct comedi_rangeinfo __user *arg); | |
5 | 6 | int insn_inval(struct comedi_device *dev, struct comedi_subdevice *s, |
6 | 7 | struct comedi_insn *insn, unsigned int *data); |
7 | 8 | int comedi_alloc_board_minor(struct device *hardware_device); |
drivers/staging/comedi/range.c
... | ... | @@ -21,8 +21,9 @@ |
21 | 21 | |
22 | 22 | */ |
23 | 23 | |
24 | -#include "comedidev.h" | |
25 | 24 | #include <linux/uaccess.h> |
25 | +#include "comedidev.h" | |
26 | +#include "internal.h" | |
26 | 27 | |
27 | 28 | const struct comedi_lrange range_bipolar10 = { 1, {BIP_RANGE(10)} }; |
28 | 29 | EXPORT_SYMBOL(range_bipolar10); |
... | ... | @@ -50,7 +51,8 @@ |
50 | 51 | writes: |
51 | 52 | n struct comedi_krange structures to rangeinfo->range_ptr |
52 | 53 | */ |
53 | -int do_rangeinfo_ioctl(struct comedi_device *dev, struct comedi_rangeinfo *arg) | |
54 | +int do_rangeinfo_ioctl(struct comedi_device *dev, | |
55 | + struct comedi_rangeinfo __user *arg) | |
54 | 56 | { |
55 | 57 | struct comedi_rangeinfo it; |
56 | 58 | int subd, chan; |