diff options
author | Roger Quadros <rogerq@ti.com> | 2012-11-26 08:17:32 -0500 |
---|---|---|
committer | Roger Quadros <rogerq@ti.com> | 2013-02-13 06:22:41 -0500 |
commit | 8bdbd1549479840293e46bf0f84d7174e77b7b5e (patch) | |
tree | 4f08c2410d622ede3d2d7f5e7654546b78770845 /drivers/mfd/omap-usb-tll.c | |
parent | 32a51f2a536fd045c472779c13ac09e9e80ac3cc (diff) |
mfd: omap-usb-tll: Check for missing platform data in probe
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>
Diffstat (limited to 'drivers/mfd/omap-usb-tll.c')
-rw-r--r-- | drivers/mfd/omap-usb-tll.c | 15 |
1 files changed, 5 insertions, 10 deletions
diff --git a/drivers/mfd/omap-usb-tll.c b/drivers/mfd/omap-usb-tll.c index af67b96ded0f..3dbbfea515ad 100644 --- a/drivers/mfd/omap-usb-tll.c +++ b/drivers/mfd/omap-usb-tll.c | |||
@@ -225,6 +225,11 @@ static int usbtll_omap_probe(struct platform_device *pdev) | |||
225 | return -ENOMEM; | 225 | return -ENOMEM; |
226 | } | 226 | } |
227 | 227 | ||
228 | if (!pdata) { | ||
229 | dev_err(dev, "Platform data missing\n"); | ||
230 | return -ENODEV; | ||
231 | } | ||
232 | |||
228 | spin_lock_init(&tll->lock); | 233 | spin_lock_init(&tll->lock); |
229 | 234 | ||
230 | tll->pdata = pdata; | 235 | tll->pdata = pdata; |
@@ -368,11 +373,6 @@ static int usbtll_runtime_resume(struct device *dev) | |||
368 | 373 | ||
369 | dev_dbg(dev, "usbtll_runtime_resume\n"); | 374 | dev_dbg(dev, "usbtll_runtime_resume\n"); |
370 | 375 | ||
371 | if (!pdata) { | ||
372 | dev_dbg(dev, "missing platform_data\n"); | ||
373 | return -ENODEV; | ||
374 | } | ||
375 | |||
376 | spin_lock_irqsave(&tll->lock, flags); | 376 | spin_lock_irqsave(&tll->lock, flags); |
377 | 377 | ||
378 | for (i = 0; i < tll->nch; i++) { | 378 | for (i = 0; i < tll->nch; i++) { |
@@ -404,11 +404,6 @@ static int usbtll_runtime_suspend(struct device *dev) | |||
404 | 404 | ||
405 | dev_dbg(dev, "usbtll_runtime_suspend\n"); | 405 | dev_dbg(dev, "usbtll_runtime_suspend\n"); |
406 | 406 | ||
407 | if (!pdata) { | ||
408 | dev_dbg(dev, "missing platform_data\n"); | ||
409 | return -ENODEV; | ||
410 | } | ||
411 | |||
412 | spin_lock_irqsave(&tll->lock, flags); | 407 | spin_lock_irqsave(&tll->lock, flags); |
413 | 408 | ||
414 | for (i = 0; i < tll->nch; i++) { | 409 | for (i = 0; i < tll->nch; i++) { |