Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Unverified Commit c32569e3 authored by Rob Herring's avatar Rob Herring Committed by Mark Brown
Browse files

regulator: Use of_node_name_eq for node name comparisons



Convert string compares of DT node names to use of_node_name_eq helper
instead. This removes direct access to the node name pointer.

For instances using of_node_cmp, this has the side effect of now using
case sensitive comparisons. This should not matter for any FDT based
system which all of these are.

Cc: Liam Girdwood <lgirdwood@gmail.com>
Cc: Mark Brown <broonie@kernel.org>
Cc: Support Opensource <support.opensource@diasemi.com>
Cc: Sangbeom Kim <sbkim73@samsung.com>
Cc: Krzysztof Kozlowski <krzk@kernel.org>
Cc: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
Cc: linux-samsung-soc@vger.kernel.org
Signed-off-by: default avatarRob Herring <robh@kernel.org>
Acked-by: default avatarAdam Thomson <Adam.Thomson.Opensource@diasemi.com>
Signed-off-by: default avatarMark Brown <broonie@kernel.org>
parent eba9473f
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -328,7 +328,7 @@ static int pm8607_regulator_dt_init(struct platform_device *pdev,
		return -ENODEV;
	}
	for_each_child_of_node(nproot, np) {
		if (!of_node_cmp(np->name, info->desc.name)) {
		if (of_node_name_eq(np, info->desc.name)) {
			config->init_data =
				of_get_regulator_init_data(&pdev->dev, np,
							   &info->desc);
+1 −1
Original line number Diff line number Diff line
@@ -435,7 +435,7 @@ static int da9052_regulator_probe(struct platform_device *pdev)
			return -ENODEV;

		for_each_child_of_node(nproot, np) {
			if (!of_node_cmp(np->name,
			if (of_node_name_eq(np,
					 regulator->info->reg_desc.name)) {
				config.init_data = of_get_regulator_init_data(
					&pdev->dev, np,
+1 −1
Original line number Diff line number Diff line
@@ -925,7 +925,7 @@ static int max8997_pmic_dt_parse_pdata(struct platform_device *pdev,
	pdata->regulators = rdata;
	for_each_child_of_node(regulators_np, reg_np) {
		for (i = 0; i < ARRAY_SIZE(regulators); i++)
			if (!of_node_cmp(reg_np->name, regulators[i].name))
			if (of_node_name_eq(reg_np, regulators[i].name))
				break;

		if (i == ARRAY_SIZE(regulators)) {
+1 −1
Original line number Diff line number Diff line
@@ -186,7 +186,7 @@ struct mc13xxx_regulator_init_data *mc13xxx_parse_regulators_dt(
		for (i = 0; i < num_regulators; i++) {
			if (!regulators[i].desc.name)
				continue;
			if (!of_node_cmp(child->name,
			if (of_node_name_eq(child,
					 regulators[i].desc.name)) {
				p->id = i;
				p->init_data = of_get_regulator_init_data(
+1 −1
Original line number Diff line number Diff line
@@ -410,7 +410,7 @@ static int rpmh_regulator_init_vreg(struct rpmh_vreg *vreg, struct device *dev,
	vreg->dev = dev;

	for (rpmh_data = pmic_rpmh_data; rpmh_data->name; rpmh_data++)
		if (!strcmp(rpmh_data->name, node->name))
		if (of_node_name_eq(node, rpmh_data->name))
			break;

	if (!rpmh_data->name) {
Loading