Skip to content

Commit

Permalink
Staging: comedi: Remove comedi_rangeinfo typedef
Browse files Browse the repository at this point in the history
Signed-off-by: Bill Pemberton <wfp5p@virginia.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
  • Loading branch information
Bill Pemberton authored and Greg Kroah-Hartman committed Apr 3, 2009
1 parent 0707bb0 commit d0a353f
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 8 deletions.
5 changes: 2 additions & 3 deletions drivers/staging/comedi/comedi.h
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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;
Expand Down Expand Up @@ -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;
};
Expand Down
2 changes: 1 addition & 1 deletion drivers/staging/comedi/comedi_compat32.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
2 changes: 1 addition & 1 deletion drivers/staging/comedi/comedidev.h
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
6 changes: 3 additions & 3 deletions drivers/staging/comedi/range.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit d0a353f

Please sign in to comment.