[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1358347433-329-7-git-send-email-rogerq@ti.com>
Date: Wed, 16 Jan 2013 16:43:37 +0200
From: Roger Quadros <rogerq@...com>
To: <balbi@...com>, <sameo@...ux.intel.com>, <tony@...mide.com>
CC: <kishon@...com>, <sshtylyov@...sta.com>, <bjorn@...k.no>,
<linux-usb@...r.kernel.org>, <linux-kernel@...r.kernel.org>,
<linux-arm-kernel@...ts.infradead.org>, <rogerq@...com>
Subject: [PATCH v6 06/22] 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@...com>
---
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 7e55a83..b9f372d 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)
return -ENOMEM;
}
+ if (!pdata) {
+ dev_err(dev, "Platform data missing\n");
+ return -ENODEV;
+ }
+
spin_lock_init(&tll->lock);
tll->pdata = pdata;
@@ -370,11 +375,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++) {
@@ -406,11 +406,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++) {
--
1.7.4.1
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists