From: Laxman Dewangan <ldewangan@nvidia.com>
To: grant.likely@secretlab.ca, rob.herring@calxeda.com,
linux@arm.linux.org.uk, lrg@ti.com,
broonie@opensource.wolfsonmicro.com, swarren@nvidia.com,
olof@lixom.net
Cc: devicetree-discuss@lists.ozlabs.org, linux-doc@vger.kernel.org,
linux-kernel@vger.kernel.org, linux-tegra@vger.kernel.org,
Laxman Dewangan <ldewangan@nvidia.com>
Subject: [PATCH V3 1/4] regulator: tps62360: make init_data of platform data to pointer.
Date: Fri, 11 May 2012 12:08:42 +0530 [thread overview]
Message-ID: <1336718325-8372-2-git-send-email-ldewangan@nvidia.com> (raw)
In-Reply-To: <1336718325-8372-1-git-send-email-ldewangan@nvidia.com>
Convert platform data member regulator_init_data to pointer type.
This will avoid the copy of entire regualator init data into
platform data member when adding dt support and it can be achieve
by simple assignment:
pdata->init_data = of_get_regulator_init_data(dev, dev->of_node);
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
---
No Changes from V1 and V2.
drivers/regulator/tps62360-regulator.c | 2 +-
include/linux/regulator/tps62360.h | 4 +---
2 files changed, 2 insertions(+), 4 deletions(-)
diff --git a/drivers/regulator/tps62360-regulator.c b/drivers/regulator/tps62360-regulator.c
index 97fd98b..3506900 100644
--- a/drivers/regulator/tps62360-regulator.c
+++ b/drivers/regulator/tps62360-regulator.c
@@ -408,7 +408,7 @@ static int __devinit tps62360_probe(struct i2c_client *client,
}
config.dev = &client->dev;
- config.init_data = &pdata->reg_init_data;
+ config.init_data = pdata->reg_init_data;
config.driver_data = tps;
/* Register the regulators */
diff --git a/include/linux/regulator/tps62360.h b/include/linux/regulator/tps62360.h
index 6a5c1b2..5e11d50 100644
--- a/include/linux/regulator/tps62360.h
+++ b/include/linux/regulator/tps62360.h
@@ -26,8 +26,6 @@
#ifndef __LINUX_REGULATOR_TPS62360_H
#define __LINUX_REGULATOR_TPS62360_H
-#include <linux/regulator/machine.h>
-
/*
* struct tps62360_regulator_platform_data - tps62360 regulator platform data.
*
@@ -44,7 +42,7 @@
* @vsel1_def_state: Default state of vsel1. 1 if it is high else 0.
*/
struct tps62360_regulator_platform_data {
- struct regulator_init_data reg_init_data;
+ struct regulator_init_data *reg_init_data;
bool en_force_pwm;
bool en_discharge;
bool en_internal_pulldn;
--
1.7.1.1
next prev parent reply other threads:[~2012-05-11 6:38 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-05-11 6:38 [PATCH V3 0/4] regulator: tps62360: support dts and enable for tegra-cardhu Laxman Dewangan
2012-05-11 6:38 ` Laxman Dewangan [this message]
2012-05-11 15:09 ` [PATCH V3 1/4] regulator: tps62360: make init_data of platform data to pointer Mark Brown
2012-05-11 6:38 ` [PATCH V3 2/4] regulator: tps62360: add dt support Laxman Dewangan
2012-05-11 14:58 ` Mark Brown
[not found] ` <20120511145833.GG3960-yzvPICuk2AATkU/dhu1WVueM+bqZidxxQQ4Iyu8u01E@public.gmane.org>
2012-05-11 15:35 ` Laxman Dewangan
[not found] ` <4FAD31A5.7090006-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
2012-05-11 21:30 ` Mark Brown
2012-05-20 7:19 ` Laxman Dewangan
2012-05-11 20:36 ` Mark Brown
2012-05-11 6:38 ` [PATCH V3 3/4] ARM: tegra: config: enable REGULATOR_TPS62360 Laxman Dewangan
2012-05-11 6:38 ` [PATCH V3 4/4] ARM: dt: tegra: cardhu: register core regulator tps62360 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=1336718325-8372-2-git-send-email-ldewangan@nvidia.com \
--to=ldewangan@nvidia.com \
--cc=broonie@opensource.wolfsonmicro.com \
--cc=devicetree-discuss@lists.ozlabs.org \
--cc=grant.likely@secretlab.ca \
--cc=linux-doc@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-tegra@vger.kernel.org \
--cc=linux@arm.linux.org.uk \
--cc=lrg@ti.com \
--cc=olof@lixom.net \
--cc=rob.herring@calxeda.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).