diff options
Diffstat (limited to 'drivers/usb/host/fhci.h')
-rw-r--r-- | drivers/usb/host/fhci.h | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/drivers/usb/host/fhci.h b/drivers/usb/host/fhci.h index 72dae1c..71c3caa 100644 --- a/drivers/usb/host/fhci.h +++ b/drivers/usb/host/fhci.h @@ -20,13 +20,14 @@ #include <linux/kernel.h> #include <linux/types.h> +#include <linux/bug.h> #include <linux/spinlock.h> #include <linux/interrupt.h> #include <linux/kfifo.h> #include <linux/io.h> #include <linux/usb.h> +#include <linux/usb/hcd.h> #include <asm/qe.h> -#include "../core/hcd.h" #define USB_CLOCK 48000000 @@ -515,9 +516,13 @@ static inline int cq_put(struct kfifo *kfifo, void *p) static inline void *cq_get(struct kfifo *kfifo) { - void *p = NULL; + unsigned int sz; + void *p; + + sz = kfifo_out(kfifo, (void *)&p, sizeof(p)); + if (sz != sizeof(p)) + return NULL; - kfifo_out(kfifo, (void *)&p, sizeof(p)); return p; } |