ChangeSet 1.1371.759.21, 2004/04/23 16:40:06-07:00, stern@rowland.harvard.edu [PATCH] USB: Cosmetic improvements for the UHCI driver This patch makes a few minor improvements to the appearance of the UHCI driver. Please apply. drivers/usb/host/uhci-hcd.c | 20 ++++++++++---------- drivers/usb/host/uhci-hcd.h | 14 +++++++------- 2 files changed, 17 insertions(+), 17 deletions(-) diff -Nru a/drivers/usb/host/uhci-hcd.c b/drivers/usb/host/uhci-hcd.c --- a/drivers/usb/host/uhci-hcd.c Fri May 14 15:33:11 2004 +++ b/drivers/usb/host/uhci-hcd.c Fri May 14 15:33:11 2004 @@ -157,8 +157,8 @@ return td; } -static inline void uhci_fill_td(struct uhci_td *td, __u32 status, - __u32 token, __u32 buffer) +static inline void uhci_fill_td(struct uhci_td *td, u32 status, + u32 token, u32 buffer) { td->status = cpu_to_le32(status); td->token = cpu_to_le32(token); @@ -184,11 +184,11 @@ list_add_tail(&td->fl_list, &ftd->fl_list); td->link = ltd->link; - mb(); + wmb(); ltd->link = cpu_to_le32(td->dma_handle); } else { td->link = uhci->fl->frame[framenum]; - mb(); + wmb(); uhci->fl->frame[framenum] = cpu_to_le32(td->dma_handle); uhci->fl->frame_cpu[framenum] = td; } @@ -218,7 +218,7 @@ ptd->link = td->link; } - mb(); + wmb(); td->link = UHCI_PTR_TERM; list_del_init(&td->fl_list); @@ -352,15 +352,15 @@ * * The HC could see (and use!) any of these as we write them. */ + lqh->link = cpu_to_le32(urbp->qh->dma_handle) | UHCI_PTR_QH; if (lqh->urbp) { list_for_each (tmp, &lqh->urbp->queue_list) { struct urb_priv *turbp = list_entry(tmp, struct urb_priv, queue_list); - turbp->qh->link = cpu_to_le32(urbp->qh->dma_handle) | UHCI_PTR_QH; + turbp->qh->link = lqh->link; } } - lqh->link = cpu_to_le32(urbp->qh->dma_handle) | UHCI_PTR_QH; list_add_tail(&urbp->qh->list, &skelqh->list); } @@ -372,7 +372,7 @@ static void uhci_remove_qh(struct uhci_hcd *uhci, struct uhci_qh *qh) { struct uhci_qh *pqh; - __u32 newlink; + u32 newlink; if (!qh) return; @@ -413,7 +413,7 @@ turbp->qh->link = newlink; } } - mb(); + wmb(); /* Leave qh->link in case the HC is on the QH now, it will */ /* continue the rest of the schedule */ @@ -500,7 +500,7 @@ /* All qh's in the queue need to link to the next queue */ urbp->qh->link = eurbp->qh->link; - mb(); /* Make sure we flush everything */ + wmb(); /* Make sure we flush everything */ lltd->link = cpu_to_le32(urbp->qh->dma_handle) | UHCI_PTR_QH; diff -Nru a/drivers/usb/host/uhci-hcd.h b/drivers/usb/host/uhci-hcd.h --- a/drivers/usb/host/uhci-hcd.h Fri May 14 15:33:11 2004 +++ b/drivers/usb/host/uhci-hcd.h Fri May 14 15:33:11 2004 @@ -80,7 +80,7 @@ #define CAN_SCHEDULE_FRAMES 1000 /* how far future frames can be scheduled */ struct uhci_frame_list { - __u32 frame[UHCI_NUMFRAMES]; + u32 frame[UHCI_NUMFRAMES]; void *frame_cpu[UHCI_NUMFRAMES]; @@ -105,8 +105,8 @@ */ struct uhci_qh { /* Hardware fields */ - __u32 link; /* Next queue */ - __u32 element; /* Queue element pointer */ + u32 link; /* Next queue */ + u32 element; /* Queue element pointer */ /* Software fields */ dma_addr_t dma_handle; @@ -185,10 +185,10 @@ */ struct uhci_td { /* Hardware fields */ - __u32 link; - __u32 status; - __u32 token; - __u32 buffer; + u32 link; + u32 status; + u32 token; + u32 buffer; /* Software fields */ dma_addr_t dma_handle;