Merge tag 'regulator-v3.17-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator
Pull regulator fix from Mark Brown: "Fix some leaked OF node references in regulator drivers that have been left over following a fix on a fix to the reference counting" * tag 'regulator-v3.17-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator: regulator: remove unnecessary of_node_get() to parent
This commit is contained in:
@@ -319,7 +319,7 @@ static int pm8607_regulator_dt_init(struct platform_device *pdev,
|
|||||||
struct regulator_config *config)
|
struct regulator_config *config)
|
||||||
{
|
{
|
||||||
struct device_node *nproot, *np;
|
struct device_node *nproot, *np;
|
||||||
nproot = of_node_get(pdev->dev.parent->of_node);
|
nproot = pdev->dev.parent->of_node;
|
||||||
if (!nproot)
|
if (!nproot)
|
||||||
return -ENODEV;
|
return -ENODEV;
|
||||||
nproot = of_get_child_by_name(nproot, "regulators");
|
nproot = of_get_child_by_name(nproot, "regulators");
|
||||||
|
@@ -422,9 +422,9 @@ static int da9052_regulator_probe(struct platform_device *pdev)
|
|||||||
config.init_data = pdata->regulators[pdev->id];
|
config.init_data = pdata->regulators[pdev->id];
|
||||||
} else {
|
} else {
|
||||||
#ifdef CONFIG_OF
|
#ifdef CONFIG_OF
|
||||||
struct device_node *nproot, *np;
|
struct device_node *nproot = da9052->dev->of_node;
|
||||||
|
struct device_node *np;
|
||||||
|
|
||||||
nproot = of_node_get(da9052->dev->of_node);
|
|
||||||
if (!nproot)
|
if (!nproot)
|
||||||
return -ENODEV;
|
return -ENODEV;
|
||||||
|
|
||||||
|
@@ -226,7 +226,7 @@ static int max8907_regulator_parse_dt(struct platform_device *pdev)
|
|||||||
struct device_node *np, *regulators;
|
struct device_node *np, *regulators;
|
||||||
int ret;
|
int ret;
|
||||||
|
|
||||||
np = of_node_get(pdev->dev.parent->of_node);
|
np = pdev->dev.parent->of_node;
|
||||||
if (!np)
|
if (!np)
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
|
@@ -250,7 +250,7 @@ static int max8925_regulator_dt_init(struct platform_device *pdev,
|
|||||||
struct device_node *nproot, *np;
|
struct device_node *nproot, *np;
|
||||||
int rcount;
|
int rcount;
|
||||||
|
|
||||||
nproot = of_node_get(pdev->dev.parent->of_node);
|
nproot = pdev->dev.parent->of_node;
|
||||||
if (!nproot)
|
if (!nproot)
|
||||||
return -ENODEV;
|
return -ENODEV;
|
||||||
np = of_get_child_by_name(nproot, "regulators");
|
np = of_get_child_by_name(nproot, "regulators");
|
||||||
|
@@ -917,7 +917,7 @@ static int max8997_pmic_dt_parse_pdata(struct platform_device *pdev,
|
|||||||
struct max8997_regulator_data *rdata;
|
struct max8997_regulator_data *rdata;
|
||||||
unsigned int i, dvs_voltage_nr = 1, ret;
|
unsigned int i, dvs_voltage_nr = 1, ret;
|
||||||
|
|
||||||
pmic_np = of_node_get(iodev->dev->of_node);
|
pmic_np = iodev->dev->of_node;
|
||||||
if (!pmic_np) {
|
if (!pmic_np) {
|
||||||
dev_err(&pdev->dev, "could not find pmic sub-node\n");
|
dev_err(&pdev->dev, "could not find pmic sub-node\n");
|
||||||
return -ENODEV;
|
return -ENODEV;
|
||||||
|
@@ -1427,7 +1427,6 @@ static void palmas_dt_to_pdata(struct device *dev,
|
|||||||
u32 prop;
|
u32 prop;
|
||||||
int idx, ret;
|
int idx, ret;
|
||||||
|
|
||||||
node = of_node_get(node);
|
|
||||||
regulators = of_get_child_by_name(node, "regulators");
|
regulators = of_get_child_by_name(node, "regulators");
|
||||||
if (!regulators) {
|
if (!regulators) {
|
||||||
dev_info(dev, "regulator node not found\n");
|
dev_info(dev, "regulator node not found\n");
|
||||||
|
@@ -1014,7 +1014,7 @@ static struct tps65910_board *tps65910_parse_dt_reg_data(
|
|||||||
if (!pmic_plat_data)
|
if (!pmic_plat_data)
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
||||||
np = of_node_get(pdev->dev.parent->of_node);
|
np = pdev->dev.parent->of_node;
|
||||||
regulators = of_get_child_by_name(np, "regulators");
|
regulators = of_get_child_by_name(np, "regulators");
|
||||||
if (!regulators) {
|
if (!regulators) {
|
||||||
dev_err(&pdev->dev, "regulator node not found\n");
|
dev_err(&pdev->dev, "regulator node not found\n");
|
||||||
|
Reference in New Issue
Block a user