Skip to content

Commit

Permalink
mfd: omap-usb-tll: Check for missing platform data in probe
Browse files Browse the repository at this point in the history
No need to check for missing platform data in runtime_suspend/resume
as it makes more sense to do it in the probe function.

Signed-off-by: Roger Quadros <rogerq@ti.com>
Reviewed-by: Felipe Balbi <balbi@ti.com>
  • Loading branch information
Roger Quadros committed Feb 13, 2013
1 parent 32a51f2 commit 8bdbd15
Showing 1 changed file with 5 additions and 10 deletions.
15 changes: 5 additions & 10 deletions drivers/mfd/omap-usb-tll.c
Original file line number Diff line number Diff line change
Expand Up @@ -225,6 +225,11 @@ static int usbtll_omap_probe(struct platform_device *pdev)
return -ENOMEM;
}

if (!pdata) {
dev_err(dev, "Platform data missing\n");
return -ENODEV;
}

spin_lock_init(&tll->lock);

tll->pdata = pdata;
Expand Down Expand Up @@ -368,11 +373,6 @@ static int usbtll_runtime_resume(struct device *dev)

dev_dbg(dev, "usbtll_runtime_resume\n");

if (!pdata) {
dev_dbg(dev, "missing platform_data\n");
return -ENODEV;
}

spin_lock_irqsave(&tll->lock, flags);

for (i = 0; i < tll->nch; i++) {
Expand Down Expand Up @@ -404,11 +404,6 @@ static int usbtll_runtime_suspend(struct device *dev)

dev_dbg(dev, "usbtll_runtime_suspend\n");

if (!pdata) {
dev_dbg(dev, "missing platform_data\n");
return -ENODEV;
}

spin_lock_irqsave(&tll->lock, flags);

for (i = 0; i < tll->nch; i++) {
Expand Down

0 comments on commit 8bdbd15

Please sign in to comment.