# This is a BitKeeper generated patch for the following project:
# Project Name: Linux kernel tree
# This patch format is intended for GNU patch command version 2.5 or higher.
# This patch includes the following deltas:
# ChangeSet 1.389 -> 1.390
# drivers/usb/uhci.h 1.8 -> 1.9
# drivers/usb/uhci.c 1.25 -> 1.26
#
# The following is the BitKeeper ChangeSet Log
# --------------------------------------------
# 02/04/08 [EMAIL PROTECTED] 1.390
# [PATCH] uhci.c 2.4.19-pre6 cleanup
#
# This patch merely cleans up the code a little and doesn't fix any bugs.
# It makes a couple of code paths a bit easier to understand, removes an
# unused variable (uhci_list) and some procfs variables when not using
# procfs.
# --------------------------------------------
#
diff -Nru a/drivers/usb/uhci.c b/drivers/usb/uhci.c
--- a/drivers/usb/uhci.c Mon Apr 8 09:45:40 2002
+++ b/drivers/usb/uhci.c Mon Apr 8 09:45:40 2002
@@ -1622,8 +1622,7 @@
if (urb->status != -EINPROGRESS) {
info("uhci_transfer_result: called for URB %p not in flight?", urb);
- spin_unlock_irqrestore(&urb->lock, flags);
- return;
+ goto out;
}
switch (usb_pipetype(urb->pipe)) {
@@ -1643,10 +1642,8 @@
urbp->status = ret;
- if (ret == -EINPROGRESS) {
- spin_unlock_irqrestore(&urb->lock, flags);
- return;
- }
+ if (ret == -EINPROGRESS)
+ goto out;
switch (usb_pipetype(urb->pipe)) {
case PIPE_CONTROL:
@@ -1660,11 +1657,8 @@
break;
case PIPE_INTERRUPT:
/* Interrupts are an exception */
- if (urb->interval) {
- uhci_add_complete(urb);
- spin_unlock_irqrestore(&urb->lock, flags);
- return; /* <-- note return */
- }
+ if (urb->interval)
+ goto out_complete;
/* Release bandwidth for Interrupt or Isoc. transfers */
/* Spinlock needed ? */
@@ -1680,8 +1674,10 @@
/* Remove it from uhci->urb_list */
list_del_init(&urb->urb_list);
+out_complete:
uhci_add_complete(urb);
+out:
spin_unlock_irqrestore(&urb->lock, flags);
}
@@ -2714,6 +2710,7 @@
}
uhci->dev = dev;
+ uhci->irq = dev->irq;
uhci->io_addr = io_addr;
uhci->io_size = io_size;
pci_set_drvdata(dev, uhci);
@@ -2921,8 +2918,6 @@
if (request_irq(dev->irq, uhci_interrupt, SA_SHIRQ, "usb-uhci", uhci))
goto err_request_irq;
-
- uhci->irq = dev->irq;
/* disable legacy emulation */
pci_write_config_word(uhci->dev, USBLEGSUP, USBLEGSUP_DEFAULT);
diff -Nru a/drivers/usb/uhci.h b/drivers/usb/uhci.h
--- a/drivers/usb/uhci.h Mon Apr 8 09:45:40 2002
+++ b/drivers/usb/uhci.h Mon Apr 8 09:45:40 2002
@@ -287,16 +287,16 @@
struct uhci {
struct pci_dev *dev;
+#ifdef CONFIG_PROC_FS
/* procfs */
int num;
struct proc_dir_entry *proc_entry;
+#endif
/* Grabbed from PCI */
int irq;
unsigned int io_addr;
unsigned int io_size;
-
- struct list_head uhci_list;
struct pci_pool *qh_pool;
struct pci_pool *td_pool;
_______________________________________________
[EMAIL PROTECTED]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel