Thread (9 messages) 9 messages, 3 authors, 2012-11-15

Re: [PATCH 1/3] OF: Add helper for matching against linux,stdout-path

From: Sascha Hauer <s.hauer@pengutronix.de>
Date: 2012-11-15 08:05:05
Also in: linux-arm-kernel, linux-serial, lkml

On Wed, Nov 14, 2012 at 08:49:54PM +0000, Grant Likely wrote:
quoted
+int of_device_is_stdout_path(struct device_node *dn)
+{
+       const char *name;
+
+       name = of_get_property(of_chosen, "linux,stdout-path", NULL);
+       if (name == NULL)
+               return 0;
+
+       if (dn == of_find_node_by_path(name))
need to of_node_put() the return value of of_find_node_by_path()
quoted
+               return 1;
+
+       return 0;
+}
Hi Sascha,

I'm fine with the helper, but there really is no need for a completely
separate .c file. Just put it in drivers/of/base.c.
Agreed.

Thanks,
 Sascha

-- 
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help