From: Hans de Goede Date: Tue, 5 May 2015 21:56:06 +0000 (+0200) Subject: usb: ohci: Remove unused devgone global variable X-Git-Tag: KARO-TX6-2015-09-18~2183 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=26c47e34968bc3906357601fb4c3022470a417fc;p=karo-tx-uboot.git usb: ohci: Remove unused devgone global variable devgone is never assigned a value, so the one comparisson reading it will never be true, and devgone can be completely removed. Signed-off-by: Hans de Goede Acked-by: Marek Vasut --- diff --git a/drivers/usb/host/ohci-hcd.c b/drivers/usb/host/ohci-hcd.c index 97a7edeb53..81ef8efcbc 100644 --- a/drivers/usb/host/ohci-hcd.c +++ b/drivers/usb/host/ohci-hcd.c @@ -111,8 +111,6 @@ struct ohci_hcca ghcca[1]; struct ohci_hcca *phcca; /* this allocates EDs for all possible endpoints */ struct ohci_device ohci_dev; -/* device which was disconnected */ -struct usb_device *devgone; static inline u32 roothub_a(struct ohci *hc) { return ohci_readl(&hc->regs->roothub.a); } @@ -1380,12 +1378,6 @@ int submit_common_msg(struct usb_device *dev, unsigned long pipe, void *buffer, urb->transfer_buffer_length = transfer_len; urb->interval = interval; - /* device pulled? Shortcut the action. */ - if (devgone == dev) { - dev->status = USB_ST_CRC_ERR; - return 0; - } - #ifdef DEBUG urb->actual_length = 0; pkt_print(urb, dev, pipe, buffer, transfer_len,