From 811d39fde60ebeaa0bb102736149c5ddecb94535 Mon Sep 17 00:00:00 2001 From: Mauro Carvalho Chehab Date: Tue, 30 Dec 2008 19:48:14 -0200 Subject: Fix compilation against RHEL kernel From: Mauro Carvalho Chehab Priority: normal Signed-off-by: Mauro Carvalho Chehab --- v4l/compat.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/v4l/compat.h b/v4l/compat.h index c2b805cec..3b04c91f6 100644 --- a/v4l/compat.h +++ b/v4l/compat.h @@ -368,12 +368,14 @@ static inline int usb_endpoint_is_isoc_out( #endif #if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 21) +#ifndef RHEL_HAS_USB_ENDPOINT static inline int usb_endpoint_xfer_control( const struct usb_endpoint_descriptor *epd) { return ((epd->bmAttributes & USB_ENDPOINT_XFERTYPE_MASK) == USB_ENDPOINT_XFER_CONTROL); } +#endif /* RHEL_HAS_USB_ENDPOINT */ #endif #if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 24) @@ -381,7 +383,9 @@ static inline int usb_endpoint_num(const struct usb_endpoint_descriptor *epd) { return epd->bEndpointAddress & USB_ENDPOINT_NUMBER_MASK; } +#endif +#ifdef NEED_USB_ENDPOINT_TYPE static inline int usb_endpoint_type(const struct usb_endpoint_descriptor *epd) { return epd->bmAttributes & USB_ENDPOINT_XFERTYPE_MASK; @@ -406,9 +410,5 @@ static inline int usb_endpoint_type(const struct usb_endpoint_descriptor *epd) #define netdev_priv(dev) ((dev)->priv) #endif -#ifdef NEED_USB_ENDPOINT_TYPE -#define usb_endpoint_type(ep) \ - ((ep)->bmAttributes & USB_ENDPOINT_XFERTYPE_MASK) -#endif #endif -- cgit v1.2.3