]> git.karo-electronics.de Git - linux-beck.git/commitdiff
usb: gadget: use platform_{get,set}_drvdata()
authorJingoo Han <jg1.han@samsung.com>
Thu, 23 May 2013 10:19:22 +0000 (19:19 +0900)
committerFelipe Balbi <balbi@ti.com>
Tue, 28 May 2013 17:16:56 +0000 (20:16 +0300)
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>
drivers/usb/gadget/fsl_qe_udc.c
drivers/usb/gadget/fusb300_udc.c
drivers/usb/gadget/m66592-udc.c
drivers/usb/gadget/mv_u3d_core.c
drivers/usb/gadget/r8a66597-udc.c

index 9a7ee3347e4d925e55645c2e0f1de7ef03ca312a..f3bb363f1d4acffd04d028c7940f70ff594e4ab5 100644 (file)
@@ -2589,7 +2589,7 @@ static int qe_udc_probe(struct platform_device *ofdev)
        if (ret)
                goto err6;
 
-       dev_set_drvdata(&ofdev->dev, udc);
+       platform_set_drvdata(ofdev, udc);
        dev_info(udc->dev,
                        "%s USB controller initialized as device\n",
                        (udc->soc_type == PORT_QE) ? "QE" : "CPM");
@@ -2640,7 +2640,7 @@ static int qe_udc_resume(struct platform_device *dev)
 
 static int qe_udc_remove(struct platform_device *ofdev)
 {
-       struct qe_udc *udc = dev_get_drvdata(&ofdev->dev);
+       struct qe_udc *udc = platform_get_drvdata(ofdev);
        struct qe_ep *ep;
        unsigned int size;
        DECLARE_COMPLETION(done);
index b8632d40f8bffcd3f653a99c12f6d6b02a8cd11d..c83f3e16532582adcd4e600f0b11aefaa58a5661 100644 (file)
@@ -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;
 
index 51cfe72da5bb88d6fb0a21a1d1d2753fa2e6c115..46ba9838c3a091d084af2472cd39ada76e42ac71 100644 (file)
@@ -1533,7 +1533,7 @@ static const struct usb_gadget_ops m66592_gadget_ops = {
 
 static int __exit m66592_remove(struct platform_device *pdev)
 {
-       struct m66592           *m66592 = dev_get_drvdata(&pdev->dev);
+       struct m66592           *m66592 = platform_get_drvdata(pdev);
 
        usb_del_gadget_udc(&m66592->gadget);
 
@@ -1602,7 +1602,7 @@ static int __init m66592_probe(struct platform_device *pdev)
        m66592->irq_trigger = ires->flags & IRQF_TRIGGER_MASK;
 
        spin_lock_init(&m66592->lock);
-       dev_set_drvdata(&pdev->dev, m66592);
+       platform_set_drvdata(pdev, m66592);
 
        m66592->gadget.ops = &m66592_gadget_ops;
        m66592->gadget.max_speed = USB_SPEED_HIGH;
index 751b17af68f0657d14ef93c0aa0995c8c313bce5..07fdb3eaf48a4fd1be386e346e6e9fccc53e78ce 100644 (file)
@@ -2050,7 +2050,7 @@ static SIMPLE_DEV_PM_OPS(mv_u3d_pm_ops, mv_u3d_suspend, mv_u3d_resume);
 
 static void mv_u3d_shutdown(struct platform_device *dev)
 {
-       struct mv_u3d *u3d = dev_get_drvdata(&dev->dev);
+       struct mv_u3d *u3d = platform_get_drvdata(dev);
        u32 tmp;
 
        tmp = ioread32(&u3d->op_regs->usbcmd);
index 7ff7d9cf2061d28ebcd2b4a2935678b0f1460144..51ea1690ca5dbbddb9911be9a163cec88dbf8a03 100644 (file)
@@ -1822,7 +1822,7 @@ static const struct usb_gadget_ops r8a66597_gadget_ops = {
 
 static int __exit r8a66597_remove(struct platform_device *pdev)
 {
-       struct r8a66597         *r8a66597 = dev_get_drvdata(&pdev->dev);
+       struct r8a66597         *r8a66597 = platform_get_drvdata(pdev);
 
        usb_del_gadget_udc(&r8a66597->gadget);
        del_timer_sync(&r8a66597->timer);
@@ -1909,7 +1909,7 @@ static int __init r8a66597_probe(struct platform_device *pdev)
        }
 
        spin_lock_init(&r8a66597->lock);
-       dev_set_drvdata(&pdev->dev, r8a66597);
+       platform_set_drvdata(pdev, r8a66597);
        r8a66597->pdata = pdev->dev.platform_data;
        r8a66597->irq_sense_low = irq_trigger == IRQF_TRIGGER_LOW;