summaryrefslogtreecommitdiffstats
path: root/drivers/usb/gadget/udc/s3c-hsudc.c
diff options
context:
space:
mode:
authorFelipe Balbi <balbi@ti.com>2014-10-17 11:25:50 -0500
committerFelipe Balbi <balbi@ti.com>2014-11-03 10:01:11 -0600
commit82891b959cbb2cd1827bc2713d46840fcf8dbe14 (patch)
tree852a1f634ac71721ffee2a2b616c9b9da6efc758 /drivers/usb/gadget/udc/s3c-hsudc.c
parentc3d84dfb7f6027fff4723330620f63c08ab0e253 (diff)
downloadtalos-op-linux-82891b959cbb2cd1827bc2713d46840fcf8dbe14.tar.gz
talos-op-linux-82891b959cbb2cd1827bc2713d46840fcf8dbe14.zip
usb: gadget: udc: s3c-hsudc: do not rely on 'driver' argument
future patches will remove the extra 'driver' argument to ->udc_stop(), in order to do that, we must make sure that our UDC does not rely on it first. Signed-off-by: Felipe Balbi <balbi@ti.com>
Diffstat (limited to 'drivers/usb/gadget/udc/s3c-hsudc.c')
-rw-r--r--drivers/usb/gadget/udc/s3c-hsudc.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/drivers/usb/gadget/udc/s3c-hsudc.c b/drivers/usb/gadget/udc/s3c-hsudc.c
index f658f69567bd..f3bb2fa25115 100644
--- a/drivers/usb/gadget/udc/s3c-hsudc.c
+++ b/drivers/usb/gadget/udc/s3c-hsudc.c
@@ -1199,11 +1199,7 @@ static int s3c_hsudc_stop(struct usb_gadget *gadget,
if (!hsudc)
return -ENODEV;
- if (!driver || driver != hsudc->driver)
- return -EINVAL;
-
spin_lock_irqsave(&hsudc->lock, flags);
- hsudc->driver = NULL;
hsudc->gadget.speed = USB_SPEED_UNKNOWN;
s3c_hsudc_uninit_phy();
@@ -1222,7 +1218,9 @@ static int s3c_hsudc_stop(struct usb_gadget *gadget,
regulator_bulk_disable(ARRAY_SIZE(hsudc->supplies), hsudc->supplies);
dev_info(hsudc->dev, "unregistered gadget driver '%s'\n",
- driver->driver.name);
+ hsudc->driver->driver.name);
+ hsudc->driver = NULL;
+
return 0;
}
OpenPOWER on IntegriCloud