From: Bill Pemberton Date: Tue, 17 Mar 2009 02:06:26 +0000 (-0400) Subject: Staging: comedi: Remove comedi_rangeinfo typedef X-Git-Tag: firefly_0821_release~14777^2~274 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=d0a353f637593ce8b0e08848cc7c871b766cb4ee;p=firefly-linux-kernel-4.4.55.git Staging: comedi: Remove comedi_rangeinfo typedef Signed-off-by: Bill Pemberton Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/staging/comedi/comedi.h b/drivers/staging/comedi/comedi.h index fe7f1c4a4450..82298faac2c3 100644 --- a/drivers/staging/comedi/comedi.h +++ b/drivers/staging/comedi/comedi.h @@ -299,7 +299,7 @@ enum comedi_support_level { #define COMEDI_LOCK _IO(CIO, 5) #define COMEDI_UNLOCK _IO(CIO, 6) #define COMEDI_CANCEL _IO(CIO, 7) -#define COMEDI_RANGEINFO _IOR(CIO, 8, comedi_rangeinfo) +#define COMEDI_RANGEINFO _IOR(CIO, 8, struct comedi_rangeinfo) #define COMEDI_CMD _IOR(CIO, 9, struct comedi_cmd) #define COMEDI_CMDTEST _IOR(CIO, 10, struct comedi_cmd) #define COMEDI_INSNLIST _IOR(CIO, 11, struct comedi_insnlist) @@ -310,7 +310,6 @@ enum comedi_support_level { /* structures */ -typedef struct comedi_rangeinfo_struct comedi_rangeinfo; typedef struct comedi_krange_struct comedi_krange; typedef struct comedi_bufconfig_struct comedi_bufconfig; typedef struct comedi_bufinfo_struct comedi_bufinfo; @@ -378,7 +377,7 @@ struct comedi_chaninfo { unsigned int unused[4]; }; -struct comedi_rangeinfo_struct { +struct comedi_rangeinfo { unsigned int range_type; void *range_ptr; }; diff --git a/drivers/staging/comedi/comedi_compat32.c b/drivers/staging/comedi/comedi_compat32.c index f3cedb528e49..2fa771e4c127 100644 --- a/drivers/staging/comedi/comedi_compat32.c +++ b/drivers/staging/comedi/comedi_compat32.c @@ -158,7 +158,7 @@ static int compat_chaninfo(struct file *file, unsigned long arg) /* Handle 32-bit COMEDI_RANGEINFO ioctl. */ static int compat_rangeinfo(struct file *file, unsigned long arg) { - comedi_rangeinfo __user *rangeinfo; + struct comedi_rangeinfo __user *rangeinfo; struct comedi32_rangeinfo_struct __user *rangeinfo32; int err; union { diff --git a/drivers/staging/comedi/comedidev.h b/drivers/staging/comedi/comedidev.h index e6a3005e19de..15e457a0cd9e 100644 --- a/drivers/staging/comedi/comedidev.h +++ b/drivers/staging/comedi/comedidev.h @@ -375,7 +375,7 @@ enum subdevice_runflags { various internal comedi functions */ -int do_rangeinfo_ioctl(struct comedi_device *dev, comedi_rangeinfo *arg); +int do_rangeinfo_ioctl(struct comedi_device *dev, struct comedi_rangeinfo *arg); int check_chanlist(struct comedi_subdevice *s, int n, unsigned int *chanlist); void comedi_set_subdevice_runflags(struct comedi_subdevice *s, unsigned mask, unsigned bits); diff --git a/drivers/staging/comedi/range.c b/drivers/staging/comedi/range.c index ef7ad56174bf..3778873cd5e7 100644 --- a/drivers/staging/comedi/range.c +++ b/drivers/staging/comedi/range.c @@ -44,14 +44,14 @@ const struct comedi_lrange range_unknown = { 1, {{0, 1000000, UNIT_none}} }; writes: n comedi_krange structures to rangeinfo->range_ptr */ -int do_rangeinfo_ioctl(struct 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 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;