Hi,
Sascha Hauer writes:
On Wed, Nov 21, 2012 at 04:57:05PM +0100, Jean-Christophe PLAGNIOL-VILLARD wrote:
quoted
From: Sascha Hauer <s.hauer@pengutronix.de>
devicetrees may have a linux,stdout-path or stdout-path property
in the chosen node describing the console device. This adds a helper
function to match a device against this property and retrieve the options
so a driver can call add_preferred_console for a matching device.
[...]
quoted
+ if (!tmp)
+ return 0;
+
+ dn_stdout = of_find_node_by_path(tmp);
+
+ if (dn_stdout && dn_stdout == dn) {
+ is_stdout = 1;
+ tmp_option++;
+ *option = kstrdup(tmp_option, GFP_KERNEL);
+ }
+
+ of_node_put(dn_stdout);
dn_stdout may be NULL aswell.
which is handled gracefully by of_node_put()...
Lothar Waßmann
--
___________________________________________________________
Ka-Ro electronics GmbH | Pascalstraße 22 | D - 52076 Aachen
Phone: +49 2408 1402-0 | Fax: +49 2408 1402-10
Geschäftsführer: Matthias Kaussen
Handelsregistereintrag: Amtsgericht Aachen, HRB 4996
www.karo-electronics.de | info@karo-electronics.de
___________________________________________________________
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel