lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Message-id: <1399702014-11819-1-git-send-email-pankaj.dubey@samsung.com>
Date:	Sat, 10 May 2014 15:06:54 +0900
From:	Pankaj Dubey <pankaj.dubey@...sung.com>
To:	linux-kernel@...r.kernel.org
Cc:	sameo@...ux.intel.com, lee.jones@...aro.org,
	michal.simek@...inx.com, Pankaj Dubey <pankaj.dubey@...sung.com>
Subject: [PATCH] drivers: mfd: allow property as NULL in
 syscon_early_regmap_lookup_by_phandle

If we pass syscon device node itself as first parameter to this function
there is no need to parse and find syscon device node. So by allowing
"property" parameter as NULL allow syscon_early_regmap_lookup_by_phandle to
consider passed argument "np" itself as a syscon device node "syscon_np".
This will help us in avoiding addition of "syscon" property which points
back to it's own device node in device tree.

Signed-off-by: Pankaj Dubey <pankaj.dubey@...sung.com>
---
Hello,

This patch set depends on early_syscon_initialization patch from
Michal Simek [1]. It allows us to call syscon_early_regmap_lookup_by_phandle
with NULL property. This is similar change posted here [2] for 
syscon_regmap_lookup_by_phandle by me.

[1]: https://lkml.org/lkml/2014/4/8/239
[2]: https://lkml.org/lkml/2014/4/29/661

 drivers/mfd/syscon.c |    6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/drivers/mfd/syscon.c b/drivers/mfd/syscon.c
index 5457e59..786c6cd 100644
--- a/drivers/mfd/syscon.c
+++ b/drivers/mfd/syscon.c
@@ -103,7 +103,11 @@ struct regmap *syscon_early_regmap_lookup_by_phandle(struct device_node *np,
 	struct device_node *syscon_np;
 	struct syscon *syscon;
 
-	syscon_np = of_parse_phandle(np, property, 0);
+	if (property)
+		syscon_np = of_parse_phandle(np, property, 0);
+	else
+		syscon_np = np;
+
 	if (!syscon_np)
 		return ERR_PTR(-ENODEV);
 
-- 
1.7.10.4

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ