Skip to content

Commit

Permalink
usb: gadget: aspeed: Remove unused "suspended" flag
Browse files Browse the repository at this point in the history
The state bit in the hub is sufficient

Signed-off-by: Benjamin Herrenschmidt <[email protected]>
Signed-off-by: Felipe Balbi <[email protected]>
  • Loading branch information
ozbenh authored and Felipe Balbi committed Aug 12, 2019
1 parent 5f0625a commit 8016759
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 5 deletions.
4 changes: 0 additions & 4 deletions drivers/usb/gadget/udc/aspeed-vhub/dev.c
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,6 @@ static void ast_vhub_dev_enable(struct ast_vhub_dev *d)

/* Additional cleanups */
d->wakeup_en = false;
d->suspended = false;
d->enabled = true;
}

Expand All @@ -110,7 +109,6 @@ static void ast_vhub_dev_disable(struct ast_vhub_dev *d)
writel(0, d->regs + AST_VHUB_DEV_EN_CTRL);
d->gadget.speed = USB_SPEED_UNKNOWN;
d->enabled = false;
d->suspended = false;
}

static int ast_vhub_dev_feature(struct ast_vhub_dev *d,
Expand Down Expand Up @@ -471,7 +469,6 @@ static const struct usb_gadget_ops ast_vhub_udc_ops = {

void ast_vhub_dev_suspend(struct ast_vhub_dev *d)
{
d->suspended = true;
if (d->driver && d->driver->suspend) {
spin_unlock(&d->vhub->lock);
d->driver->suspend(&d->gadget);
Expand All @@ -481,7 +478,6 @@ void ast_vhub_dev_suspend(struct ast_vhub_dev *d)

void ast_vhub_dev_resume(struct ast_vhub_dev *d)
{
d->suspended = false;
if (d->driver && d->driver->resume) {
spin_unlock(&d->vhub->lock);
d->driver->resume(&d->gadget);
Expand Down
1 change: 0 additions & 1 deletion drivers/usb/gadget/udc/aspeed-vhub/vhub.h
Original file line number Diff line number Diff line change
Expand Up @@ -354,7 +354,6 @@ struct ast_vhub_dev {
struct usb_gadget_driver *driver;
bool registered : 1;
bool wakeup_en : 1;
bool suspended : 1;
bool enabled : 1;

/* Endpoint structures */
Expand Down

0 comments on commit 8016759

Please sign in to comment.