Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 141493
b: refs/heads/master
c: bf8db92
h: refs/heads/master
i:
  141491: ebf70fa
v: v3
  • Loading branch information
Bill Pemberton authored and Greg Kroah-Hartman committed Apr 3, 2009
1 parent ff7f474 commit d11dc87
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 27 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 82675f3547ba2a0732beabd9bb4393535f74408c
refs/heads/master: bf8db92eb3c52ccc3c28ee8d382750a7d4dc758d
52 changes: 26 additions & 26 deletions trunk/drivers/staging/comedi/comedi_compat32.c
Original file line number Diff line number Diff line change
Expand Up @@ -38,30 +38,30 @@
#endif

#define COMEDI32_CHANINFO _IOR(CIO, 3, comedi32_chaninfo)
#define COMEDI32_RANGEINFO _IOR(CIO, 8, comedi32_rangeinfo)
#define COMEDI32_RANGEINFO _IOR(CIO, 8, (struct comedi32_rangeinfo_struct))
/* N.B. COMEDI32_CMD and COMEDI_CMD ought to use _IOWR, not _IOR.
* It's too late to change it now, but it only affects the command number. */
#define COMEDI32_CMD _IOR(CIO, 9, comedi32_cmd)
#define COMEDI32_CMD _IOR(CIO, 9, (struct comedi32_cmd_struct))
/* N.B. COMEDI32_CMDTEST and COMEDI_CMDTEST ought to use _IOWR, not _IOR.
* It's too late to change it now, but it only affects the command number. */
#define COMEDI32_CMDTEST _IOR(CIO, 10, comedi32_cmd)
#define COMEDI32_INSNLIST _IOR(CIO, 11, comedi32_insnlist)
#define COMEDI32_INSN _IOR(CIO, 12, comedi32_insn)
#define COMEDI32_CMDTEST _IOR(CIO, 10, (struct comedi32_cmd_struct))
#define COMEDI32_INSNLIST _IOR(CIO, 11, (struct comedi32_insnlist_struct))
#define COMEDI32_INSN _IOR(CIO, 12, (struct comedi32_insn_struct))

typedef struct comedi32_chaninfo_struct {
struct comedi32_chaninfo_struct {
unsigned int subdev;
compat_uptr_t maxdata_list; /* 32-bit 'lsampl_t *' */
compat_uptr_t flaglist; /* 32-bit 'unsigned int *' */
compat_uptr_t rangelist; /* 32-bit 'unsigned int *' */
unsigned int unused[4];
} comedi32_chaninfo;
};

typedef struct comedi32_rangeinfo_struct {
struct comedi32_rangeinfo_struct {
unsigned int range_type;
compat_uptr_t range_ptr; /* 32-bit 'void *' */
} comedi32_rangeinfo;
};

typedef struct comedi32_cmd_struct {
struct comedi32_cmd_struct {
unsigned int subdev;
unsigned int flags;
unsigned int start_src;
Expand All @@ -78,21 +78,21 @@ typedef struct comedi32_cmd_struct {
unsigned int chanlist_len;
compat_uptr_t data; /* 32-bit 'sampl_t *' */
unsigned int data_len;
} comedi32_cmd;
};

typedef struct comedi32_insn_struct {
struct comedi32_insn_struct {
unsigned int insn;
unsigned int n;
compat_uptr_t data; /* 32-bit 'lsampl_t *' */
unsigned int subdev;
unsigned int chanspec;
unsigned int unused[3];
} comedi32_insn;
};

typedef struct comedi32_insnlist_struct {
struct comedi32_insnlist_struct {
unsigned int n_insns;
compat_uptr_t insns; /* 32-bit 'comedi_insn *' */
} comedi32_insnlist;
};

/* Handle translated ioctl. */
static int translated_ioctl(struct file *file, unsigned int cmd,
Expand Down Expand Up @@ -123,8 +123,8 @@ static int translated_ioctl(struct file *file, unsigned int cmd,
/* Handle 32-bit COMEDI_CHANINFO ioctl. */
static int compat_chaninfo(struct file *file, unsigned long arg)
{
comedi_chaninfo __user *chaninfo;
comedi32_chaninfo __user *chaninfo32;
struct comedi_chaninfo_struct __user *chaninfo;
struct comedi32_chaninfo_struct __user *chaninfo32;
int err;
union {
unsigned int uint;
Expand Down Expand Up @@ -159,7 +159,7 @@ static int compat_chaninfo(struct file *file, unsigned long arg)
static int compat_rangeinfo(struct file *file, unsigned long arg)
{
comedi_rangeinfo __user *rangeinfo;
comedi32_rangeinfo __user *rangeinfo32;
struct comedi32_rangeinfo_struct __user *rangeinfo32;
int err;
union {
unsigned int uint;
Expand Down Expand Up @@ -189,7 +189,7 @@ static int compat_rangeinfo(struct file *file, unsigned long arg)

/* Copy 32-bit cmd structure to native cmd structure. */
static int get_compat_cmd(comedi_cmd __user *cmd,
comedi32_cmd __user *cmd32)
struct comedi32_cmd_struct __user *cmd32)
{
int err;
union {
Expand Down Expand Up @@ -239,7 +239,7 @@ static int get_compat_cmd(comedi_cmd __user *cmd,
}

/* Copy native cmd structure to 32-bit cmd structure. */
static int put_compat_cmd(comedi32_cmd __user *cmd32, comedi_cmd __user *cmd)
static int put_compat_cmd(struct comedi32_cmd_struct __user *cmd32, comedi_cmd __user *cmd)
{
int err;
unsigned int temp;
Expand Down Expand Up @@ -290,7 +290,7 @@ static int put_compat_cmd(comedi32_cmd __user *cmd32, comedi_cmd __user *cmd)
static int compat_cmd(struct file *file, unsigned long arg)
{
comedi_cmd __user *cmd;
comedi32_cmd __user *cmd32;
struct comedi32_cmd_struct __user *cmd32;
int rc;

cmd32 = compat_ptr(arg);
Expand All @@ -307,7 +307,7 @@ static int compat_cmd(struct file *file, unsigned long arg)
static int compat_cmdtest(struct file *file, unsigned long arg)
{
comedi_cmd __user *cmd;
comedi32_cmd __user *cmd32;
struct comedi32_cmd_struct __user *cmd32;
int rc, err;

cmd32 = compat_ptr(arg);
Expand All @@ -330,7 +330,7 @@ static int compat_cmdtest(struct file *file, unsigned long arg)

/* Copy 32-bit insn structure to native insn structure. */
static int get_compat_insn(comedi_insn __user *insn,
comedi32_insn __user *insn32)
struct comedi32_insn_struct __user *insn32)
{
int err;
union {
Expand Down Expand Up @@ -364,8 +364,8 @@ static int compat_insnlist(struct file *file, unsigned long arg)
comedi_insnlist insnlist;
comedi_insn insn[1];
} __user *s;
comedi32_insnlist __user *insnlist32;
comedi32_insn __user *insn32;
struct comedi32_insnlist_struct __user *insnlist32;
struct comedi32_insn_struct __user *insn32;
compat_uptr_t uptr;
unsigned int n_insns, n;
int err, rc;
Expand Down Expand Up @@ -411,7 +411,7 @@ static int compat_insnlist(struct file *file, unsigned long arg)
static int compat_insn(struct file *file, unsigned long arg)
{
comedi_insn __user *insn;
comedi32_insn __user *insn32;
struct comedi32_insn_struct __user *insn32;
int rc;

insn32 = compat_ptr(arg);
Expand Down

0 comments on commit d11dc87

Please sign in to comment.