Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 259566
b: refs/heads/master
c: dca2218
h: refs/heads/master
v: v3
  • Loading branch information
Vincent Bossier authored and Greg Kroah-Hartman committed Jun 28, 2011
1 parent c150fdd commit 4f73ac3
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 54b4a779c9565c475a17cc1254a38f293a5ba3ef
refs/heads/master: dca22184262de0171bafdf613a8d3992a818b70f
16 changes: 16 additions & 0 deletions trunk/drivers/staging/vme/devices/vme_user.c
Original file line number Diff line number Diff line change
Expand Up @@ -461,6 +461,7 @@ static int vme_user_ioctl(struct inode *inode, struct file *file,
{
struct vme_master master;
struct vme_slave slave;
struct vme_irq_id irq_req;
unsigned long copied;
unsigned int minor = MINOR(inode->i_rdev);
int retval;
Expand All @@ -471,6 +472,21 @@ static int vme_user_ioctl(struct inode *inode, struct file *file,

switch (type[minor]) {
case CONTROL_MINOR:
switch (cmd) {
case VME_IRQ_GEN:
copied = copy_from_user(&irq_req, (char *)arg,
sizeof(struct vme_irq_id));
if (copied != 0) {
printk(KERN_WARNING "Partial copy from userspace\n");
return -EFAULT;
}

retval = vme_irq_generate(vme_user_bridge,
irq_req.level,
irq_req.statid);

return retval;
}
break;
case MASTER_MINOR:
switch (cmd) {
Expand Down
6 changes: 6 additions & 0 deletions trunk/drivers/staging/vme/devices/vme_user.h
Original file line number Diff line number Diff line change
Expand Up @@ -43,10 +43,16 @@ struct vme_slave {
#endif
};

struct vme_irq_id {
__u8 level;
__u8 statid;
};

#define VME_GET_SLAVE _IOR(VME_IOC_MAGIC, 1, struct vme_slave)
#define VME_SET_SLAVE _IOW(VME_IOC_MAGIC, 2, struct vme_slave)
#define VME_GET_MASTER _IOR(VME_IOC_MAGIC, 3, struct vme_master)
#define VME_SET_MASTER _IOW(VME_IOC_MAGIC, 4, struct vme_master)
#define VME_IRQ_GEN _IOW(VME_IOC_MAGIC, 5, struct vme_irq_id)

#endif /* _VME_USER_H_ */

0 comments on commit 4f73ac3

Please sign in to comment.