diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2009-04-05 11:06:45 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2009-04-05 11:06:45 -0700 |
commit | 3516c6a8dc0b1153c611c4cf0dc4a51631f052bb (patch) | |
tree | c54a5fc916cbe73e43dee20902642f367f44a551 /drivers/staging/comedi/range.c | |
parent | 714f83d5d9f7c785f622259dad1f4fad12d64664 (diff) | |
parent | ba0e1ebb7ea0616eebc29d2077355bacea62a9d8 (diff) |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging-2.6: (714 commits)
Staging: sxg: slicoss: Specify the license for Sahara SXG and Slicoss drivers
Staging: serqt_usb: fix build due to proc tty changes
Staging: serqt_usb: fix checkpatch errors
Staging: serqt_usb: add TODO file
Staging: serqt_usb: Lindent the code
Staging: add USB serial Quatech driver
staging: document that the wifi staging drivers a bit better
Staging: echo cleanup
Staging: BUG to BUG_ON changes
Staging: remove some pointless conditionals before kfree_skb()
Staging: line6: fix build error, select SND_RAWMIDI
Staging: line6: fix checkpatch errors in variax.c
Staging: line6: fix checkpatch errors in toneport.c
Staging: line6: fix checkpatch errors in pcm.c
Staging: line6: fix checkpatch errors in midibuf.c
Staging: line6: fix checkpatch errors in midi.c
Staging: line6: fix checkpatch errors in dumprequest.c
Staging: line6: fix checkpatch errors in driver.c
Staging: line6: fix checkpatch errors in audio.c
Staging: line6: fix checkpatch errors in pod.c
...
Diffstat (limited to 'drivers/staging/comedi/range.c')
-rw-r--r-- | drivers/staging/comedi/range.c | 35 |
1 files changed, 17 insertions, 18 deletions
diff --git a/drivers/staging/comedi/range.c b/drivers/staging/comedi/range.c index 61dc3cd6a9f..ac200d929f3 100644 --- a/drivers/staging/comedi/range.c +++ b/drivers/staging/comedi/range.c @@ -24,12 +24,12 @@ #include "comedidev.h" #include <asm/uaccess.h> -const comedi_lrange range_bipolar10 = { 1, {BIP_RANGE(10)} }; -const comedi_lrange range_bipolar5 = { 1, {BIP_RANGE(5)} }; -const comedi_lrange range_bipolar2_5 = { 1, {BIP_RANGE(2.5)} }; -const comedi_lrange range_unipolar10 = { 1, {UNI_RANGE(10)} }; -const comedi_lrange range_unipolar5 = { 1, {UNI_RANGE(5)} }; -const comedi_lrange range_unknown = { 1, {{0, 1000000, UNIT_none}} }; +const struct comedi_lrange range_bipolar10 = { 1, {BIP_RANGE(10)} }; +const struct comedi_lrange range_bipolar5 = { 1, {BIP_RANGE(5)} }; +const struct comedi_lrange range_bipolar2_5 = { 1, {BIP_RANGE(2.5)} }; +const struct comedi_lrange range_unipolar10 = { 1, {UNI_RANGE(10)} }; +const struct comedi_lrange range_unipolar5 = { 1, {UNI_RANGE(5)} }; +const struct comedi_lrange range_unknown = { 1, {{0, 1000000, UNIT_none}} }; /* COMEDI_RANGEINFO @@ -42,16 +42,16 @@ const comedi_lrange range_unknown = { 1, {{0, 1000000, UNIT_none}} }; range info structure writes: - n comedi_krange structures to rangeinfo->range_ptr + n struct comedi_krange structures to rangeinfo->range_ptr */ -int do_rangeinfo_ioctl(comedi_device * dev, comedi_rangeinfo * arg) +int do_rangeinfo_ioctl(struct comedi_device *dev, struct comedi_rangeinfo *arg) { - comedi_rangeinfo it; + struct comedi_rangeinfo it; int subd, chan; - const comedi_lrange *lr; - comedi_subdevice *s; + const struct comedi_lrange *lr; + struct comedi_subdevice *s; - if (copy_from_user(&it, arg, sizeof(comedi_rangeinfo))) + if (copy_from_user(&it, arg, sizeof(struct comedi_rangeinfo))) return -EFAULT; subd = (it.range_type >> 24) & 0xf; chan = (it.range_type >> 16) & 0xff; @@ -78,17 +78,17 @@ int do_rangeinfo_ioctl(comedi_device * dev, comedi_rangeinfo * arg) } if (copy_to_user(it.range_ptr, lr->range, - sizeof(comedi_krange) * lr->length)) + sizeof(struct comedi_krange) * lr->length)) return -EFAULT; return 0; } -static int aref_invalid(comedi_subdevice * s, unsigned int chanspec) +static int aref_invalid(struct comedi_subdevice *s, unsigned int chanspec) { unsigned int aref; - // disable reporting invalid arefs... maybe someday + /* disable reporting invalid arefs... maybe someday */ return 0; aref = CR_AREF(chanspec); @@ -120,7 +120,7 @@ static int aref_invalid(comedi_subdevice * s, unsigned int chanspec) This function checks each element in a channel/gain list to make make sure it is valid. */ -int check_chanlist(comedi_subdevice * s, int n, unsigned int *chanlist) +int check_chanlist(struct comedi_subdevice *s, int n, unsigned int *chanlist) { int i; int chan; @@ -135,9 +135,8 @@ int check_chanlist(comedi_subdevice * s, int n, unsigned int *chanlist) i, chanlist[i], s->n_chan, s->range_table->length); #if 0 - for (i = 0; i < n; i++) { + for (i = 0; i < n; i++) printk("[%d]=0x%08x\n", i, chanlist[i]); - } #endif return -EINVAL; } |