From: Andrzej Hajda <hidden> Date: 2013-09-25 11:51:51
Hi,
Those two independent patches fixes DT display_timings related code.
The first patch replaces of_find_node_by_name by of_get_child_by_name.
Usage of of_find_node_by_name in such context is incorrect:
- we need only direct child, and this function looks for following nodes
on implementation internal list regardless of the hierarchy,
- there is no warranty that child nodes are after parent nodes in
this search order, it happens to be true for DT created from FDT,
but it is not true for dynamic DT.
The second patch just removes unused/broken function.
Regards
Andrzej
Andrzej Hajda (2):
video: of: display_timing: correct display-timings node finding
video: of: display_timing: remove broken of_display_timings_exist
drivers/video/of_display_timing.c | 26 +++-----------------------
include/video/of_display_timing.h | 1 -
2 files changed, 3 insertions(+), 24 deletions(-)
--
1.8.1.2
From: Andrzej Hajda <hidden> Date: 2013-09-25 11:51:57
of_get_display_timing(s) use of_find_node_by_name
to get child node, this is incorrect, of_get_child_by_name
should be used instead. The patch fixes it.
Small typo is also corrected.
Signed-off-by: Andrzej Hajda <redacted>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
---
drivers/video/of_display_timing.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
From: Andrzej Hajda <hidden> Date: 2013-09-25 11:52:03
of_display_timings_exist is implemented incorrectly.
It tries to find property instead of node.
The function is not used anyway so the patch removes it.
Signed-off-by: Andrzej Hajda <redacted>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
---
drivers/video/of_display_timing.c | 20 --------------------
include/video/of_display_timing.h | 1 -
2 files changed, 21 deletions(-)
From: Tomi Valkeinen <hidden> Date: 2013-09-26 09:37:24
On 25/09/13 14:51, Andrzej Hajda wrote:
of_display_timings_exist is implemented incorrectly.
It tries to find property instead of node.
The function is not used anyway so the patch removes it.
Signed-off-by: Andrzej Hajda <redacted>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
---
drivers/video/of_display_timing.c | 20 --------------------
include/video/of_display_timing.h | 1 -
2 files changed, 21 deletions(-)
Fix by removal? =).
Wouldn't it be better to fix the function? It's not used currently, but
the whole display-timings stuff is still quite new. One could use
of_get_display_timings() to check for the existence of timings, but that
function will print an error if no timings are found.
Then again, what would be the case where you want to check if the
timings exist... I'd presume that there either has to be timings or
there are no timings.
So, I don't know. Any else has opinions whether to remove or fix the
function?
Tomi
From: Tomi Valkeinen <hidden> Date: 2013-09-26 09:37:56
On 25/09/13 14:51, Andrzej Hajda wrote:
of_get_display_timing(s) use of_find_node_by_name
to get child node, this is incorrect, of_get_child_by_name
should be used instead. The patch fixes it.
Small typo is also corrected.
Signed-off-by: Andrzej Hajda <redacted>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
---
drivers/video/of_display_timing.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)