summaryrefslogtreecommitdiff
path: root/include/drm/drm_panel.h
diff options
context:
space:
mode:
authorBoris Brezillon <boris.brezillon@bootlin.com>2018-05-09 16:00:39 +0300
committerThierry Reding <treding@nvidia.com>2018-07-10 18:59:05 +0300
commit5fa8e4a22182df8ea39adeba4bd518506e26a96d (patch)
tree4b9a3df577632f7c2165ea86d4d98f2cb5018266 /include/drm/drm_panel.h
parent0ca0c827efdf248dfb4bbd4b9066acb6337e07ac (diff)
downloadlinux-5fa8e4a22182df8ea39adeba4bd518506e26a96d.tar.xz
drm/panel: Make of_drm_find_panel() return an ERR_PTR() instead of NULL
Right now, the DRM panel logic returns NULL when a panel pointing to the passed OF node is not present in the list of registered panels. Most drivers interpret this NULL value as -EPROBE_DEFER, but we are about to modify the semantic of of_drm_find_panel() and let the framework return -ENODEV when the device node we're pointing to has a status property that is not equal to "okay" or "ok". Let's first patch the of_drm_find_panel() implementation to return ERR_PTR(-EPROBE_DEFER) instead of NULL and patch all callers to replace the '!panel' check by an 'IS_ERR(panel)' one. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Signed-off-by: Thierry Reding <treding@nvidia.com> Link: https://patchwork.freedesktop.org/patch/msgid/20180509130042.9435-2-boris.brezillon@bootlin.com
Diffstat (limited to 'include/drm/drm_panel.h')
-rw-r--r--include/drm/drm_panel.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/include/drm/drm_panel.h b/include/drm/drm_panel.h
index 26a1b5fd8796..582a0ec0aa70 100644
--- a/include/drm/drm_panel.h
+++ b/include/drm/drm_panel.h
@@ -200,7 +200,7 @@ struct drm_panel *of_drm_find_panel(const struct device_node *np);
#else
static inline struct drm_panel *of_drm_find_panel(const struct device_node *np)
{
- return NULL;
+ return ERR_PTR(-ENODEV);
}
#endif