Commit a5790e9e authored by Sergei Shtylyov's avatar Sergei Shtylyov Committed by Greg Kroah-Hartman

fhci-hub: kill 'len' variable in fhci_hub_control()

The 'len' variable in fhci_hub_control() is write-only, so totally useless.
Signed-off-by: default avatarSergei Shtylyov <sergei.shtylyov@cogentembedded.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 368fbc34
...@@ -208,7 +208,6 @@ int fhci_hub_control(struct usb_hcd *hcd, u16 typeReq, u16 wValue, ...@@ -208,7 +208,6 @@ int fhci_hub_control(struct usb_hcd *hcd, u16 typeReq, u16 wValue,
{ {
struct fhci_hcd *fhci = hcd_to_fhci(hcd); struct fhci_hcd *fhci = hcd_to_fhci(hcd);
int retval = 0; int retval = 0;
int len = 0;
struct usb_hub_status *hub_status; struct usb_hub_status *hub_status;
struct usb_port_status *port_status; struct usb_port_status *port_status;
unsigned long flags; unsigned long flags;
...@@ -272,7 +271,6 @@ int fhci_hub_control(struct usb_hcd *hcd, u16 typeReq, u16 wValue, ...@@ -272,7 +271,6 @@ int fhci_hub_control(struct usb_hcd *hcd, u16 typeReq, u16 wValue,
break; break;
case GetHubDescriptor: case GetHubDescriptor:
memcpy(buf, root_hub_des, sizeof(root_hub_des)); memcpy(buf, root_hub_des, sizeof(root_hub_des));
len = (buf[0] < wLength) ? buf[0] : wLength;
break; break;
case GetHubStatus: case GetHubStatus:
hub_status = (struct usb_hub_status *)buf; hub_status = (struct usb_hub_status *)buf;
...@@ -280,7 +278,6 @@ int fhci_hub_control(struct usb_hcd *hcd, u16 typeReq, u16 wValue, ...@@ -280,7 +278,6 @@ int fhci_hub_control(struct usb_hcd *hcd, u16 typeReq, u16 wValue,
cpu_to_le16(fhci->vroot_hub->hub.wHubStatus); cpu_to_le16(fhci->vroot_hub->hub.wHubStatus);
hub_status->wHubChange = hub_status->wHubChange =
cpu_to_le16(fhci->vroot_hub->hub.wHubChange); cpu_to_le16(fhci->vroot_hub->hub.wHubChange);
len = 4;
break; break;
case GetPortStatus: case GetPortStatus:
port_status = (struct usb_port_status *)buf; port_status = (struct usb_port_status *)buf;
...@@ -288,7 +285,6 @@ int fhci_hub_control(struct usb_hcd *hcd, u16 typeReq, u16 wValue, ...@@ -288,7 +285,6 @@ int fhci_hub_control(struct usb_hcd *hcd, u16 typeReq, u16 wValue,
cpu_to_le16(fhci->vroot_hub->port.wPortStatus); cpu_to_le16(fhci->vroot_hub->port.wPortStatus);
port_status->wPortChange = port_status->wPortChange =
cpu_to_le16(fhci->vroot_hub->port.wPortChange); cpu_to_le16(fhci->vroot_hub->port.wPortChange);
len = 4;
break; break;
case SetHubFeature: case SetHubFeature:
switch (wValue) { switch (wValue) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment