All of lore.kernel.org
 help / color / mirror / Atom feed
From: Laxman Dewangan <ldewangan@nvidia.com>
To: <sameo@linux.intel.com>
Cc: <broonie@opensource.wolfsonmicro.com>, <swarren@nvidia.com>,
	<linux-kernel@vger.kernel.org>,
	Laxman Dewangan <ldewangan@nvidia.com>
Subject: [PATCH V3 RESEND 1/4] mfd: tps65910: Initialize mfd devices after all initialization done
Date: Tue, 13 Nov 2012 19:33:56 +0530	[thread overview]
Message-ID: <1352815439-26040-2-git-send-email-ldewangan@nvidia.com> (raw)
In-Reply-To: <1352815439-26040-1-git-send-email-ldewangan@nvidia.com>

Add sub devices of tps65910 after all initialization like interrupt,
clock etc. is done. This will make sure that require data gets
initialized properly before sub devices probe's get called.

Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Reviewed-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
---
Changes from V:
- Rearrange patches so that this patch become first in place of third of
  series.
- Added Reviewed by: Mark as it is already revieved in patch V1.

Changes from V2:
- None.

 drivers/mfd/tps65910.c |   16 ++++++++--------
 1 files changed, 8 insertions(+), 8 deletions(-)

diff --git a/drivers/mfd/tps65910.c b/drivers/mfd/tps65910.c
index 0d79ce2..27fbbe5 100644
--- a/drivers/mfd/tps65910.c
+++ b/drivers/mfd/tps65910.c
@@ -279,14 +279,6 @@ static __devinit int tps65910_i2c_probe(struct i2c_client *i2c,
 		return ret;
 	}
 
-	ret = mfd_add_devices(tps65910->dev, -1,
-			      tps65910s, ARRAY_SIZE(tps65910s),
-			      NULL, 0, NULL);
-	if (ret < 0) {
-		dev_err(&i2c->dev, "mfd_add_devices failed: %d\n", ret);
-		return ret;
-	}
-
 	init_data->irq = pmic_plat_data->irq;
 	init_data->irq_base = pmic_plat_data->irq_base;
 
@@ -299,6 +291,14 @@ static __devinit int tps65910_i2c_probe(struct i2c_client *i2c,
 		pm_power_off = tps65910_power_off;
 	}
 
+	ret = mfd_add_devices(tps65910->dev, -1,
+			      tps65910s, ARRAY_SIZE(tps65910s),
+			      NULL, 0, NULL);
+	if (ret < 0) {
+		dev_err(&i2c->dev, "mfd_add_devices failed: %d\n", ret);
+		return ret;
+	}
+
 	return ret;
 }
 
-- 
1.7.1.1


  reply	other threads:[~2012-11-13 14:07 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-11-13 14:03 [PATCH V3 RESEND 0/4] mfd: tps65910: use regmap irq framework for interrupt Laxman Dewangan
2012-11-13 14:03 ` Laxman Dewangan [this message]
2012-11-13 14:03 ` [PATCH RESEND V3 2/4] mfd: tps65910: use regmap irq framework for interrupt support Laxman Dewangan
2012-11-13 14:03 ` [PATCH V3 RESEND 3/4] mfd: tps65910: move interrupt implementation code to mfd file Laxman Dewangan
2012-11-13 14:03 ` [PATCH V3 RESEND 4/4] mfd: tps65910: pass irq_domain when adding mfd sub devices Laxman Dewangan
2012-11-13 19:56 ` [PATCH V3 RESEND 0/4] mfd: tps65910: use regmap irq framework for interrupt Samuel Ortiz
2012-11-14  1:24   ` Mark Brown
2012-11-18 23:23     ` Samuel Ortiz
2012-11-19  3:50       ` Laxman Dewangan

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1352815439-26040-2-git-send-email-ldewangan@nvidia.com \
    --to=ldewangan@nvidia.com \
    --cc=broonie@opensource.wolfsonmicro.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=sameo@linux.intel.com \
    --cc=swarren@nvidia.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.