Skip to content

Commit

Permalink
usb: chipidea: remove duplicate dev_set_drvdata for host_start
Browse files Browse the repository at this point in the history
The core driver has already done it, besides, move set driver data
operation just after ci has allocated successfully in case some
code (like ci_role_start) want to access this driver data.

Signed-off-by: Peter Chen <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
  • Loading branch information
Peter Chen authored and gregkh committed Nov 26, 2014
1 parent 5b15730 commit 14b4099
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 2 deletions.
2 changes: 1 addition & 1 deletion drivers/usb/chipidea/core.c
Original file line number Diff line number Diff line change
Expand Up @@ -669,6 +669,7 @@ static int ci_hdrc_probe(struct platform_device *pdev)
if (!ci)
return -ENOMEM;

platform_set_drvdata(pdev, ci);
ci->dev = dev;
ci->platdata = dev_get_platdata(dev);
ci->imx28_write_fix = !!(ci->platdata->flags &
Expand Down Expand Up @@ -782,7 +783,6 @@ static int ci_hdrc_probe(struct platform_device *pdev)
}
}

platform_set_drvdata(pdev, ci);
ret = devm_request_irq(dev, ci->irq, ci_irq, IRQF_SHARED,
ci->platdata->name, ci);
if (ret)
Expand Down
1 change: 0 additions & 1 deletion drivers/usb/chipidea/host.c
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,6 @@ static int host_start(struct ci_hdrc *ci)
if (!hcd)
return -ENOMEM;

dev_set_drvdata(ci->dev, ci);
hcd->rsrc_start = ci->hw_bank.phys;
hcd->rsrc_len = ci->hw_bank.size;
hcd->regs = ci->hw_bank.abs;
Expand Down

0 comments on commit 14b4099

Please sign in to comment.