summaryrefslogtreecommitdiff
path: root/drivers/usb/gadget/fusb300_udc.c
diff options
context:
space:
mode:
authorJingoo Han <jg1.han@samsung.com>2013-05-23 19:19:22 +0900
committerFelipe Balbi <balbi@ti.com>2013-05-28 20:16:56 +0300
commitdae8eadf2a8a125dbbfc067a7ff16cf600b1023b (patch)
tree48219c4fc8332025107275db6d37e7fb0be22e99 /drivers/usb/gadget/fusb300_udc.c
parent6d3d61f8219455c047777e2f7954cd3cbac2ec4e (diff)
usb: gadget: use platform_{get,set}_drvdata()
Use the wrapper functions for getting and setting the driver data using platform_device instead of using dev_{get,set}_drvdata() with &pdev->dev, so we can directly pass a struct platform_device. Signed-off-by: Jingoo Han <jg1.han@samsung.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
Diffstat (limited to 'drivers/usb/gadget/fusb300_udc.c')
-rw-r--r--drivers/usb/gadget/fusb300_udc.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/usb/gadget/fusb300_udc.c b/drivers/usb/gadget/fusb300_udc.c
index b8632d40f8bf..c83f3e165325 100644
--- a/drivers/usb/gadget/fusb300_udc.c
+++ b/drivers/usb/gadget/fusb300_udc.c
@@ -1347,7 +1347,7 @@ static const struct usb_gadget_ops fusb300_gadget_ops = {
static int __exit fusb300_remove(struct platform_device *pdev)
{
- struct fusb300 *fusb300 = dev_get_drvdata(&pdev->dev);
+ struct fusb300 *fusb300 = platform_get_drvdata(pdev);
usb_del_gadget_udc(&fusb300->gadget);
iounmap(fusb300->reg);
@@ -1416,7 +1416,7 @@ static int __init fusb300_probe(struct platform_device *pdev)
spin_lock_init(&fusb300->lock);
- dev_set_drvdata(&pdev->dev, fusb300);
+ platform_set_drvdata(pdev, fusb300);
fusb300->gadget.ops = &fusb300_gadget_ops;