diff options
author | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2012-05-14 13:24:13 +0100 |
---|---|---|
committer | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2012-05-14 15:25:33 +0100 |
commit | b68b45d77d7c23c6d92576d494796912883be4e1 (patch) | |
tree | e08fba8b878ea6210baf14e0400181d12f8af7d5 /drivers/regulator/wm8994-regulator.c | |
parent | b1a868310e7024650918119d292129446b2f8336 (diff) |
regulator: wm8994: Allow registration with no platform data
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Diffstat (limited to 'drivers/regulator/wm8994-regulator.c')
-rw-r--r-- | drivers/regulator/wm8994-regulator.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/drivers/regulator/wm8994-regulator.c b/drivers/regulator/wm8994-regulator.c index 7c64ce599d2a..9a994316e63c 100644 --- a/drivers/regulator/wm8994-regulator.c +++ b/drivers/regulator/wm8994-regulator.c @@ -168,9 +168,6 @@ static __devinit int wm8994_ldo_probe(struct platform_device *pdev) dev_dbg(&pdev->dev, "Probing LDO%d\n", id + 1); - if (!pdata) - return -ENODEV; - ldo = devm_kzalloc(&pdev->dev, sizeof(struct wm8994_ldo), GFP_KERNEL); if (ldo == NULL) { dev_err(&pdev->dev, "Unable to allocate private data\n"); @@ -192,9 +189,10 @@ static __devinit int wm8994_ldo_probe(struct platform_device *pdev) ldo->is_enabled = true; config.dev = wm8994->dev; - config.init_data = pdata->ldo[id].init_data; config.driver_data = ldo; config.regmap = wm8994->regmap; + if (pdata) + config.init_data = pdata->ldo[id].init_data; ldo->regulator = regulator_register(&wm8994_ldo_desc[id], &config); if (IS_ERR(ldo->regulator)) { |