aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/regulator/max14577.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/regulator/max14577.c')
-rw-r--r--drivers/regulator/max14577.c18
1 files changed, 7 insertions, 11 deletions
diff --git a/drivers/regulator/max14577.c b/drivers/regulator/max14577.c
index b1078ba3f393..ed60baaeceec 100644
--- a/drivers/regulator/max14577.c
+++ b/drivers/regulator/max14577.c
@@ -1,7 +1,7 @@
1/* 1/*
2 * max14577.c - Regulator driver for the Maxim 14577 2 * max14577.c - Regulator driver for the Maxim 14577
3 * 3 *
4 * Copyright (C) 2013 Samsung Electronics 4 * Copyright (C) 2013,2014 Samsung Electronics
5 * Krzysztof Kozlowski <k.kozlowski@samsung.com> 5 * Krzysztof Kozlowski <k.kozlowski@samsung.com>
6 * 6 *
7 * This program is free software; you can redistribute it and/or modify 7 * This program is free software; you can redistribute it and/or modify
@@ -22,12 +22,6 @@
22#include <linux/mfd/max14577-private.h> 22#include <linux/mfd/max14577-private.h>
23#include <linux/regulator/of_regulator.h> 23#include <linux/regulator/of_regulator.h>
24 24
25struct max14577_regulator {
26 struct device *dev;
27 struct max14577 *max14577;
28 struct regulator_dev **regulators;
29};
30
31static int max14577_reg_is_enabled(struct regulator_dev *rdev) 25static int max14577_reg_is_enabled(struct regulator_dev *rdev)
32{ 26{
33 int rid = rdev_get_id(rdev); 27 int rid = rdev_get_id(rdev);
@@ -166,12 +160,14 @@ static int max14577_regulator_dt_parse_pdata(struct platform_device *pdev)
166 160
167 ret = of_regulator_match(&pdev->dev, np, max14577_regulator_matches, 161 ret = of_regulator_match(&pdev->dev, np, max14577_regulator_matches,
168 MAX14577_REG_MAX); 162 MAX14577_REG_MAX);
169 if (ret < 0) { 163 if (ret < 0)
170 dev_err(&pdev->dev, "Error parsing regulator init data: %d\n", ret); 164 dev_err(&pdev->dev, "Error parsing regulator init data: %d\n", ret);
171 return ret; 165 else
172 } 166 ret = 0;
173 167
174 return 0; 168 of_node_put(np);
169
170 return ret;
175} 171}
176 172
177static inline struct regulator_init_data *match_init_data(int index) 173static inline struct regulator_init_data *match_init_data(int index)