Message ID | 1380109892-13040-3-git-send-email-a.hajda@samsung.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
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 <a.hajda@samsung.com> > 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
diff --git a/drivers/video/of_display_timing.c b/drivers/video/of_display_timing.c index ba5b40f..b423bb9 100644 --- a/drivers/video/of_display_timing.c +++ b/drivers/video/of_display_timing.c @@ -247,23 +247,3 @@ dispfail: return NULL; } EXPORT_SYMBOL_GPL(of_get_display_timings); - -/** - * of_display_timings_exist - check if a display-timings node is provided - * @np: device_node with the timing - **/ -int of_display_timings_exist(struct device_node *np) -{ - struct device_node *timings_np; - - if (!np) - return -EINVAL; - - timings_np = of_parse_phandle(np, "display-timings", 0); - if (!timings_np) - return -EINVAL; - - of_node_put(timings_np); - return 1; -} -EXPORT_SYMBOL_GPL(of_display_timings_exist); diff --git a/include/video/of_display_timing.h b/include/video/of_display_timing.h index 79e6697..16cde75 100644 --- a/include/video/of_display_timing.h +++ b/include/video/of_display_timing.h @@ -18,6 +18,5 @@ struct display_timings; int of_get_display_timing(struct device_node *np, const char *name, struct display_timing *dt); struct display_timings *of_get_display_timings(struct device_node *np); -int of_display_timings_exist(struct device_node *np); #endif