432601
Bugzilla: N/A
432601
Upstream-status: https://lkml.org/lkml/2013/11/12/413 (hopefully 3.13)
432601
432601
From ce4a59012b5f2a9b521cad4610f055a792841951 Mon Sep 17 00:00:00 2001
432601
From: Josh Boyer <jwboyer@fedoraproject.org>
432601
Date: Tue, 12 Nov 2013 11:03:57 -0500
432601
Subject: [PATCH] staging: imx-drm: Fix modular build of DRM_IMX_IPUV3
432601
432601
commit b8d181e408af (staging: drm/imx: add drm plane support) added a file
432601
to the make target for DRM_IMX_IPUV3 but didn't adjust the objs required
432601
to actually build that as a module.  Kbuild got confused and this lead to
432601
link errors like:
432601
432601
ERROR: "ipu_plane_disable" [drivers/staging/imx-drm/ipuv3-crtc.ko] undefined!
432601
ERROR: "ipu_plane_enable" [drivers/staging/imx-drm/ipuv3-crtc.ko] undefined!
432601
432601
Additionally, it added a call to imx_drm_crtc_id which also fails with a
432601
link error as above.  To fix this, we adjust the make target with the proper
432601
objs, which will change the name of the resulting .ko.  We also add an
432601
EXPORT_SYMBOL_GPL for imx_drm_crtc_id.
432601
432601
Signed-off-by: Josh Boyer <jwboyer@fedoraproject.org>
432601
---
432601
 drivers/staging/imx-drm/Makefile       | 4 +++-
432601
 drivers/staging/imx-drm/imx-drm-core.c | 1 +
432601
 2 files changed, 4 insertions(+), 1 deletion(-)
432601
432601
diff --git a/drivers/staging/imx-drm/Makefile b/drivers/staging/imx-drm/Makefile
432601
index 2c3a9e1..8742432 100644
432601
--- a/drivers/staging/imx-drm/Makefile
432601
+++ b/drivers/staging/imx-drm/Makefile
432601
@@ -8,4 +8,6 @@ obj-$(CONFIG_DRM_IMX_TVE) += imx-tve.o
432601
 obj-$(CONFIG_DRM_IMX_LDB) += imx-ldb.o
432601
 obj-$(CONFIG_DRM_IMX_FB_HELPER) += imx-fbdev.o
432601
 obj-$(CONFIG_DRM_IMX_IPUV3_CORE) += ipu-v3/
432601
-obj-$(CONFIG_DRM_IMX_IPUV3)	+= ipuv3-crtc.o ipuv3-plane.o
432601
+
432601
+imx-ipuv3-crtc-objs  := ipuv3-crtc.o ipuv3-plane.o
432601
+obj-$(CONFIG_DRM_IMX_IPUV3)	+= imx-ipuv3-crtc.o
432601
diff --git a/drivers/staging/imx-drm/imx-drm-core.c b/drivers/staging/imx-drm/imx-drm-core.c
432601
index 4483d47..2b366d8 100644
432601
--- a/drivers/staging/imx-drm/imx-drm-core.c
432601
+++ b/drivers/staging/imx-drm/imx-drm-core.c
432601
@@ -72,6 +72,7 @@ int imx_drm_crtc_id(struct imx_drm_crtc *crtc)
432601
 {
432601
 	return crtc->pipe;
432601
 }
432601
+EXPORT_SYMBOL_GPL(imx_drm_crtc_id);
432601
 
432601
 static void imx_drm_driver_lastclose(struct drm_device *drm)
432601
 {
432601
-- 
432601
1.8.3.1
432601