Commit da613f4f authored by Bill Pemberton's avatar Bill Pemberton Committed by Greg Kroah-Hartman

Staging: comedi: Remove comedi_insnlist typedef

Signed-off-by: default avatarBill Pemberton <wfp5p@virginia.edu>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent 90035c08
...@@ -302,7 +302,7 @@ enum comedi_support_level { ...@@ -302,7 +302,7 @@ enum comedi_support_level {
#define COMEDI_RANGEINFO _IOR(CIO, 8, comedi_rangeinfo) #define COMEDI_RANGEINFO _IOR(CIO, 8, comedi_rangeinfo)
#define COMEDI_CMD _IOR(CIO, 9, struct comedi_cmd) #define COMEDI_CMD _IOR(CIO, 9, struct comedi_cmd)
#define COMEDI_CMDTEST _IOR(CIO, 10, struct comedi_cmd) #define COMEDI_CMDTEST _IOR(CIO, 10, struct comedi_cmd)
#define COMEDI_INSNLIST _IOR(CIO, 11, comedi_insnlist) #define COMEDI_INSNLIST _IOR(CIO, 11, struct comedi_insnlist)
#define COMEDI_INSN _IOR(CIO, 12, struct comedi_insn) #define COMEDI_INSN _IOR(CIO, 12, struct comedi_insn)
#define COMEDI_BUFCONFIG _IOR(CIO, 13, comedi_bufconfig) #define COMEDI_BUFCONFIG _IOR(CIO, 13, comedi_bufconfig)
#define COMEDI_BUFINFO _IOWR(CIO, 14, comedi_bufinfo) #define COMEDI_BUFINFO _IOWR(CIO, 14, comedi_bufinfo)
...@@ -310,7 +310,6 @@ enum comedi_support_level { ...@@ -310,7 +310,6 @@ enum comedi_support_level {
/* structures */ /* structures */
typedef struct comedi_insnlist_struct comedi_insnlist;
typedef struct comedi_chaninfo_struct comedi_chaninfo; typedef struct comedi_chaninfo_struct comedi_chaninfo;
typedef struct comedi_subdinfo_struct comedi_subdinfo; typedef struct comedi_subdinfo_struct comedi_subdinfo;
typedef struct comedi_devinfo_struct comedi_devinfo; typedef struct comedi_devinfo_struct comedi_devinfo;
...@@ -344,7 +343,7 @@ struct comedi_insn { ...@@ -344,7 +343,7 @@ struct comedi_insn {
unsigned int unused[3]; unsigned int unused[3];
}; };
struct comedi_insnlist_struct { struct comedi_insnlist {
unsigned int n_insns; unsigned int n_insns;
struct comedi_insn *insns; struct comedi_insn *insns;
}; };
......
...@@ -361,7 +361,7 @@ static int get_compat_insn(struct comedi_insn __user *insn, ...@@ -361,7 +361,7 @@ static int get_compat_insn(struct comedi_insn __user *insn,
static int compat_insnlist(struct file *file, unsigned long arg) static int compat_insnlist(struct file *file, unsigned long arg)
{ {
struct combined_insnlist { struct combined_insnlist {
comedi_insnlist insnlist; struct comedi_insnlist insnlist;
struct comedi_insn insn[1]; struct comedi_insn insn[1];
} __user *s; } __user *s;
struct comedi32_insnlist_struct __user *insnlist32; struct comedi32_insnlist_struct __user *insnlist32;
......
...@@ -628,13 +628,13 @@ static int parse_insn(struct comedi_device *dev, struct comedi_insn *insn, unsig ...@@ -628,13 +628,13 @@ static int parse_insn(struct comedi_device *dev, struct comedi_insn *insn, unsig
#define MAX_SAMPLES 256 #define MAX_SAMPLES 256
static int do_insnlist_ioctl(struct comedi_device *dev, void *arg, void *file) static int do_insnlist_ioctl(struct comedi_device *dev, void *arg, void *file)
{ {
comedi_insnlist insnlist; struct comedi_insnlist insnlist;
struct comedi_insn *insns = NULL; struct comedi_insn *insns = NULL;
unsigned int *data = NULL; unsigned int *data = NULL;
int i = 0; int i = 0;
int ret = 0; int ret = 0;
if (copy_from_user(&insnlist, arg, sizeof(comedi_insnlist))) if (copy_from_user(&insnlist, arg, sizeof(struct comedi_insnlist)))
return -EFAULT; return -EFAULT;
data = kmalloc(sizeof(unsigned int) * MAX_SAMPLES, GFP_KERNEL); data = kmalloc(sizeof(unsigned int) * MAX_SAMPLES, GFP_KERNEL);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment