Staging: comedi: Remove comedi_bufconfig typedef
Signed-off-by: Bill Pemberton <wfp5p@virginia.edu> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This commit is contained in:
parent
1f6325d629
commit
be6aba4a42
@ -304,13 +304,12 @@ enum comedi_support_level {
|
|||||||
#define COMEDI_CMDTEST _IOR(CIO, 10, struct comedi_cmd)
|
#define COMEDI_CMDTEST _IOR(CIO, 10, struct comedi_cmd)
|
||||||
#define COMEDI_INSNLIST _IOR(CIO, 11, struct 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, struct comedi_bufconfig)
|
||||||
#define COMEDI_BUFINFO _IOWR(CIO, 14, comedi_bufinfo)
|
#define COMEDI_BUFINFO _IOWR(CIO, 14, comedi_bufinfo)
|
||||||
#define COMEDI_POLL _IO(CIO, 15)
|
#define COMEDI_POLL _IO(CIO, 15)
|
||||||
|
|
||||||
/* structures */
|
/* structures */
|
||||||
|
|
||||||
typedef struct comedi_bufconfig_struct comedi_bufconfig;
|
|
||||||
typedef struct comedi_bufinfo_struct comedi_bufinfo;
|
typedef struct comedi_bufinfo_struct comedi_bufinfo;
|
||||||
|
|
||||||
struct comedi_trig {
|
struct comedi_trig {
|
||||||
@ -417,7 +416,7 @@ struct comedi_devconfig {
|
|||||||
int options[COMEDI_NDEVCONFOPTS];
|
int options[COMEDI_NDEVCONFOPTS];
|
||||||
};
|
};
|
||||||
|
|
||||||
struct comedi_bufconfig_struct {
|
struct comedi_bufconfig {
|
||||||
unsigned int subdevice;
|
unsigned int subdevice;
|
||||||
unsigned int flags;
|
unsigned int flags;
|
||||||
|
|
||||||
|
@ -274,12 +274,12 @@ static int do_devconfig_ioctl(struct comedi_device *dev, struct comedi_devconfig
|
|||||||
*/
|
*/
|
||||||
static int do_bufconfig_ioctl(struct comedi_device *dev, void *arg)
|
static int do_bufconfig_ioctl(struct comedi_device *dev, void *arg)
|
||||||
{
|
{
|
||||||
comedi_bufconfig bc;
|
struct comedi_bufconfig bc;
|
||||||
struct comedi_async *async;
|
struct comedi_async *async;
|
||||||
struct comedi_subdevice *s;
|
struct comedi_subdevice *s;
|
||||||
int ret = 0;
|
int ret = 0;
|
||||||
|
|
||||||
if (copy_from_user(&bc, arg, sizeof(comedi_bufconfig)))
|
if (copy_from_user(&bc, arg, sizeof(struct comedi_bufconfig)))
|
||||||
return -EFAULT;
|
return -EFAULT;
|
||||||
|
|
||||||
if (bc.subdevice >= dev->n_subdevices || bc.subdevice < 0)
|
if (bc.subdevice >= dev->n_subdevices || bc.subdevice < 0)
|
||||||
@ -340,7 +340,7 @@ static int do_bufconfig_ioctl(struct comedi_device *dev, void *arg)
|
|||||||
bc.maximum_size = async->max_bufsize;
|
bc.maximum_size = async->max_bufsize;
|
||||||
|
|
||||||
copyback:
|
copyback:
|
||||||
if (copy_to_user(arg, &bc, sizeof(comedi_bufconfig)))
|
if (copy_to_user(arg, &bc, sizeof(struct comedi_bufconfig)))
|
||||||
return -EFAULT;
|
return -EFAULT;
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user