aboutsummaryrefslogtreecommitdiff
path: root/drivers/staging/rspiusb/rspiusb.h
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2009-06-19 17:48:32 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2009-06-19 17:48:32 -0700
commitfb20871a54961b82d35303b43452928186c1361d (patch)
tree1beeb39e45eda1c8b5893090904b583fceeb07ef /drivers/staging/rspiusb/rspiusb.h
parentbee89ab228e6f51c4ddd3481b9bd491859a8ee7b (diff)
parentc7a5d70796379e3d51d0c652fbe1634b81d3bbd5 (diff)
Merge git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging-2.6: (342 commits) Staging: comedi: fix build errors Staging: udlfb: update to version 0.2.3 Staging: udlfb: fix some sparse warnings. Staging: udlfb: clean up checkpatch warnings in udlfb.c Staging: udlfb: clean up checkpatch warnings in udlfb.h Staging: udlfb: add udlfb driver to build Staging: add udlfb driver Staging: pata_rdc: remove pointless comments Staging: pata_rdc: remove DRIVER macros Staging: pata_rdc: remove dbgprintf macro Staging: pata_rdc: remove broken flag Staging: pata_rdc: fix build warnings Staging: pata_rdc: use PCI_DEVICE Staging: pata_rdc: remove function prototypes Staging: pata_rdc: coding style fixes Staging: pata_rdc: convert code to work in 2.6.29 Staging: pata_rdc: add driver to the build system Staging: add pata_rdc driver Staging: remove obsolete serqt_usb driver Staging: serqt_usb2 add the driver to the build ...
Diffstat (limited to 'drivers/staging/rspiusb/rspiusb.h')
-rw-r--r--drivers/staging/rspiusb/rspiusb.h28
1 files changed, 18 insertions, 10 deletions
diff --git a/drivers/staging/rspiusb/rspiusb.h b/drivers/staging/rspiusb/rspiusb.h
index 965cd2d8c19..3fc1db7b1c4 100644
--- a/drivers/staging/rspiusb/rspiusb.h
+++ b/drivers/staging/rspiusb/rspiusb.h
@@ -3,20 +3,28 @@
#define PIUSB_MAGIC 'm'
#define PIUSB_IOCTL_BASE 192
-#define PIUSB_GETVNDCMD _IOR(PIUSB_MAGIC, PIUSB_IOCTL_BASE + 1, struct ioctl_struct)
-#define PIUSB_SETVNDCMD _IOW(PIUSB_MAGIC, PIUSB_IOCTL_BASE + 2, struct ioctl_struct)
-#define PIUSB_WRITEPIPE _IOW(PIUSB_MAGIC, PIUSB_IOCTL_BASE + 3, struct ioctl_struct)
-#define PIUSB_READPIPE _IOR(PIUSB_MAGIC, PIUSB_IOCTL_BASE + 4, struct ioctl_struct)
-#define PIUSB_SETFRAMESIZE _IOW(PIUSB_MAGIC, PIUSB_IOCTL_BASE + 5, struct ioctl_struct)
-#define PIUSB_WHATCAMERA _IO(PIUSB_MAGIC, PIUSB_IOCTL_BASE + 6)
-#define PIUSB_USERBUFFER _IOW(PIUSB_MAGIC, PIUSB_IOCTL_BASE + 7, struct ioctl_struct)
-#define PIUSB_ISHIGHSPEED _IO(PIUSB_MAGIC, PIUSB_IOCTL_BASE + 8)
-#define PIUSB_UNMAP_USERBUFFER _IOW(PIUSB_MAGIC, PIUSB_IOCTL_BASE + 9, struct ioctl_struct)
+
+#define PIUSB_IOR(offset) \
+ _IOR(PIUSB_MAGIC, PIUSB_IOCTL_BASE + offset, struct ioctl_struct)
+#define PIUSB_IOW(offset) \
+ _IOW(PIUSB_MAGIC, PIUSB_IOCTL_BASE + offset, struct ioctl_struct)
+#define PIUSB_IO(offset) \
+ _IO(PIUSB_MAGIC, PIUSB_IOCTL_BASE + offset)
+
+#define PIUSB_GETVNDCMD PIUSB_IOR(1)
+#define PIUSB_SETVNDCMD PIUSB_IOW(2)
+#define PIUSB_WRITEPIPE PIUSB_IOW(3)
+#define PIUSB_READPIPE PIUSB_IOR(4)
+#define PIUSB_SETFRAMESIZE PIUSB_IOW(5)
+#define PIUSB_WHATCAMERA PIUSB_IO(6)
+#define PIUSB_USERBUFFER PIUSB_IOW(7)
+#define PIUSB_ISHIGHSPEED PIUSB_IO(8)
+#define PIUSB_UNMAP_USERBUFFER PIUSB_IOW(9)
struct ioctl_struct {
unsigned char cmd;
unsigned long numbytes;
- unsigned char dir; //1=out;0=in
+ unsigned char dir; /* 1=out; 0=in */
int endpoint;
int numFrames;
unsigned char *pData;