patch-2.4.21 linux-2.4.21/include/linux/usb.h
Next file: linux-2.4.21/include/linux/usb_scanner_ioctl.h
Previous file: linux-2.4.21/include/linux/umem.h
Back to the patch index
Back to the overall index
- Lines: 20
- Date:
2003-06-13 07:51:39.000000000 -0700
- Orig file:
linux-2.4.20/include/linux/usb.h
- Orig date:
2002-11-28 15:53:15.000000000 -0800
diff -urN linux-2.4.20/include/linux/usb.h linux-2.4.21/include/linux/usb.h
@@ -998,9 +998,16 @@
#define PIPE_DEVEP_MASK 0x0007ff00
/* The D0/D1 toggle bits */
-#define usb_gettoggle(dev, ep, out) (((dev)->toggle[out] >> ep) & 1)
-#define usb_dotoggle(dev, ep, out) ((dev)->toggle[out] ^= (1 << ep))
-#define usb_settoggle(dev, ep, out, bit) ((dev)->toggle[out] = ((dev)->toggle[out] & ~(1 << ep)) | ((bit) << ep))
+#define usb_gettoggle(dev, ep, out) (((dev)->toggle[out] >> (ep)) & 1)
+#define usb_dotoggle(dev, ep, out) ((dev)->toggle[out] ^= (1 << (ep)))
+static inline void usb_settoggle(struct usb_device *dev,
+ unsigned int ep,
+ unsigned int out,
+ int bit)
+{
+ dev->toggle[out] &= ~(1 << ep);
+ dev->toggle[out] |= bit << ep;
+}
/* Endpoint halt control/status */
#define usb_endpoint_out(ep_dir) (((ep_dir >> 7) & 1) ^ 1)
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)