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");
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);
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);
spin_lock_init(&fusb300->lock);
- dev_set_drvdata(&pdev->dev, fusb300);
+ platform_set_drvdata(pdev, fusb300);
fusb300->gadget.ops = &fusb300_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);
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;
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);
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);
}
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;