summaryrefslogtreecommitdiff
path: root/include/drm
diff options
context:
space:
mode:
authorJani Nikula <jani.nikula@intel.com>2019-07-18 18:14:57 +0200
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2020-01-27 14:51:01 +0100
commite34d8d2b2e2f49d1aa933a1e5f15d3e9ee9aa54b (patch)
tree519ed20d4dd8f83780ba295d3ae6d61222d5b89f /include/drm
parent6f8fa5c32d687b61d5c13d225c40f9b3714bdb1e (diff)
drm/panel: make drm_panel.h self-contained
[ Upstream commit bf3f5e98559360661a3d2af340d46522512c0b00 ] Fix build warning if drm_panel.h is built with CONFIG_OF=n or CONFIG_DRM_PANEL=n and included without the prerequisite err.h: ./include/drm/drm_panel.h: In function ‘of_drm_find_panel’: ./include/drm/drm_panel.h:203:9: error: implicit declaration of function ‘ERR_PTR’ [-Werror=implicit-function-declaration] return ERR_PTR(-ENODEV); ^~~~~~~ ./include/drm/drm_panel.h:203:9: error: returning ‘int’ from a function with return type ‘struct drm_panel *’ makes pointer from integer without a cast [-Werror=int-conversion] return ERR_PTR(-ENODEV); ^~~~~~~~~~~~~~~~ Fixes: 5fa8e4a22182 ("drm/panel: Make of_drm_find_panel() return an ERR_PTR() instead of NULL") Signed-off-by: Jani Nikula <jani.nikula@intel.com> Acked-by: Thierry Reding <treding@nvidia.com> Reviewed-by: Sam Ravnborg <sam@ravnborg.org> Reviewed-by: Sean Paul <sean@poorly.run> Cc: Boris Brezillon <bbrezillon@kernel.org> Signed-off-by: Sam Ravnborg <sam@ravnborg.org> Link: https://patchwork.freedesktop.org/patch/msgid/20190718161507.2047-2-sam@ravnborg.org Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'include/drm')
-rw-r--r--include/drm/drm_panel.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/include/drm/drm_panel.h b/include/drm/drm_panel.h
index 777814755fa6..675aa1e876ce 100644
--- a/include/drm/drm_panel.h
+++ b/include/drm/drm_panel.h
@@ -24,6 +24,7 @@
#ifndef __DRM_PANEL_H__
#define __DRM_PANEL_H__
+#include <linux/err.h>
#include <linux/errno.h>
#include <linux/list.h>