From 3ec6eb9cc2dbfa5b626f813ab8077eb71da60af2 Mon Sep 17 00:00:00 2001 From: Tomasz Figa <t.figa@samsung.com> Date: Thu, 4 Apr 2013 18:17:19 +0200 Subject: regulator: max8952: Separate constraints from platform data struct This patch modifies platform data structure of max8952 driver to use pointer to regulator_init_data struct instead of embedding it. This is a prerequisite for adding Device Tree support for the driver. Signed-off-by: Tomasz Figa <t.figa@samsung.com> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> --- drivers/regulator/max8952.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'drivers/regulator/max8952.c') diff --git a/drivers/regulator/max8952.c b/drivers/regulator/max8952.c index fc7935a19e3a..100b9177dba1 100644 --- a/drivers/regulator/max8952.c +++ b/drivers/regulator/max8952.c @@ -154,11 +154,11 @@ static int max8952_pmic_probe(struct i2c_client *client, max8952->pdata = pdata; config.dev = max8952->dev; - config.init_data = &pdata->reg_data; + config.init_data = pdata->reg_data; config.driver_data = max8952; config.ena_gpio = pdata->gpio_en; - if (pdata->reg_data.constraints.boot_on) + if (pdata->reg_data->constraints.boot_on) config.ena_gpio_flags |= GPIOF_OUT_INIT_HIGH; max8952->rdev = regulator_register(®ulator, &config); -- cgit v1.2.3