]> bbs.cooldavid.org Git - net-next-2.6.git/commitdiff
USB: FHCI: Fix build after kfifo rework
authorAnton Vorontsov <avorontsov@ru.mvista.com>
Wed, 27 Jan 2010 14:09:36 +0000 (17:09 +0300)
committerGreg Kroah-Hartman <gregkh@suse.de>
Tue, 16 Feb 2010 23:11:07 +0000 (15:11 -0800)
After kfifo rework FHCI fails to build:

  CC      drivers/usb/host/fhci-tds.o
drivers/usb/host/fhci-tds.c: In function 'fhci_ep0_free':
drivers/usb/host/fhci-tds.c:108: error: used struct type value where scalar is required
drivers/usb/host/fhci-tds.c:118: error: used struct type value where scalar is required
drivers/usb/host/fhci-tds.c:128: error: used struct type value where scalar is required

This is because kfifos are no longer pointers in the ep struct.
So, instead of checking the pointers, we should now check if kfifo
is initialized.

Reported-by: Josh Boyer <jwboyer@gmail.com>
Signed-off-by: Anton Vorontsov <avorontsov@ru.mvista.com>
Acked-by: Stefani Seibold <stefani@seibold.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/usb/host/fhci-tds.c

index d224ab467a401d729b13b2d8c9f44f380616f184..e1232890c78bb9f9f4d931589dc14adeb363f2ba 100644 (file)
@@ -105,7 +105,7 @@ void fhci_ep0_free(struct fhci_usb *usb)
                if (ep->td_base)
                        cpm_muram_free(cpm_muram_offset(ep->td_base));
 
-               if (ep->conf_frame_Q) {
+               if (kfifo_initialized(&ep->conf_frame_Q)) {
                        size = cq_howmany(&ep->conf_frame_Q);
                        for (; size; size--) {
                                struct packet *pkt = cq_get(&ep->conf_frame_Q);
@@ -115,7 +115,7 @@ void fhci_ep0_free(struct fhci_usb *usb)
                        cq_delete(&ep->conf_frame_Q);
                }
 
-               if (ep->empty_frame_Q) {
+               if (kfifo_initialized(&ep->empty_frame_Q)) {
                        size = cq_howmany(&ep->empty_frame_Q);
                        for (; size; size--) {
                                struct packet *pkt = cq_get(&ep->empty_frame_Q);
@@ -125,7 +125,7 @@ void fhci_ep0_free(struct fhci_usb *usb)
                        cq_delete(&ep->empty_frame_Q);
                }
 
-               if (ep->dummy_packets_Q) {
+               if (kfifo_initialized(&ep->dummy_packets_Q)) {
                        size = cq_howmany(&ep->dummy_packets_Q);
                        for (; size; size--) {
                                u8 *buff = cq_get(&ep->dummy_packets_Q);