Re: [PATCH 1/2 v6] of: add helper to parse display timings

2 messages, 2 authors, 2012-10-12 · open the first message on its own page

Re: [PATCH 1/2 v6] of: add helper to parse display timings

From: Thierry Reding <hidden>
Date: 2012-10-11 19:31:18

On Mon, Oct 08, 2012 at 09:49:21AM +0200, Steffen Trumtrar wrote:
On Mon, Oct 08, 2012 at 10:07:45AM +0300, Tomi Valkeinen wrote:
quoted
On Thu, 2012-10-04 at 19:59 +0200, Steffen Trumtrar wrote:
[...]
quoted
quoted
+
+	disp->num_timings = 0;
+
+	for_each_child_of_node(timings_np, entry) {
+		disp->num_timings++;
+	}
No need for { }
Okay.
Or you could just use of_get_child_count().

Thierry

Re: [PATCH 1/2 v6] of: add helper to parse display timings

From: Steffen Trumtrar <hidden>
Date: 2012-10-12 07:21:02

On Thu, Oct 11, 2012 at 09:31:18PM +0200, Thierry Reding wrote:
On Mon, Oct 08, 2012 at 09:49:21AM +0200, Steffen Trumtrar wrote:
quoted
On Mon, Oct 08, 2012 at 10:07:45AM +0300, Tomi Valkeinen wrote:
quoted
On Thu, 2012-10-04 at 19:59 +0200, Steffen Trumtrar wrote:
[...]
quoted
quoted
quoted
+
+	disp->num_timings = 0;
+
+	for_each_child_of_node(timings_np, entry) {
+		disp->num_timings++;
+	}
No need for { }
Okay.
Or you could just use of_get_child_count().

Thierry
Ah, very nice. That's definitely better. Didn't know about that function.

Thanks,
Steffen


-- 
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