[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20170725153403.121302-1-arnd@arndb.de>
Date: Tue, 25 Jul 2017 17:33:25 +0200
From: Arnd Bergmann <arnd@...db.de>
To: Xinliang Liu <z.liuxinliang@...ilicon.com>,
Rongrong Zou <zourongrong@...il.com>,
David Airlie <airlied@...ux.ie>
Cc: Arnd Bergmann <arnd@...db.de>,
Xinwei Kong <kong.kongxinwei@...ilicon.com>,
Chen Feng <puck.chen@...ilicon.com>,
Daniel Vetter <daniel.vetter@...ll.ch>,
Sean Paul <seanpaul@...omium.org>, Jyri Sarha <jsarha@...com>,
Gabriel Krisman Bertazi <krisman@...labora.co.uk>,
Russell King <rmk+kernel@...linux.org.uk>,
Rob Herring <robh@...nel.org>,
Thierry Reding <treding@...dia.com>,
Tom Gundersen <teg@...m.no>, dri-devel@...ts.freedesktop.org,
linux-kernel@...r.kernel.org
Subject: [PATCH] drm/hisilicon: fix build error without fbdev emulation
We cannot reference priv->fbdev outside of the #ifdef:
drivers/net/virtio_net.c:1881:12: error: 'virtnet_restore_up' defined but not used [-Werror=unused-function]
static int virtnet_restore_up(struct virtio_device *vdev)
drivers/net/virtio_net.c:1859:13: error: 'virtnet_freeze_down' defined but not used [-Werror=unused-function]
static void virtnet_freeze_down(struct virtio_device *vdev)
Since the code is moved into the main probe function now, this
adds another #ifdef.
Fixes: b4dd9f1ffaba ("drm/hisilicon: Remove custom FB helper deferred setup")
Signed-off-by: Arnd Bergmann <arnd@...db.de>
---
drivers/gpu/drm/hisilicon/kirin/kirin_drm_drv.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/hisilicon/kirin/kirin_drm_drv.c b/drivers/gpu/drm/hisilicon/kirin/kirin_drm_drv.c
index 1178341c3858..d48102d1a7a4 100644
--- a/drivers/gpu/drm/hisilicon/kirin/kirin_drm_drv.c
+++ b/drivers/gpu/drm/hisilicon/kirin/kirin_drm_drv.c
@@ -121,6 +121,7 @@ static int kirin_drm_kms_init(struct drm_device *dev)
/* init kms poll for handling hpd */
drm_kms_helper_poll_init(dev);
+#ifdef CONFIG_DRM_FBDEV_EMULATION
priv->fbdev = drm_fbdev_cma_init(dev, 32,
dev->mode_config.num_connector);
if (IS_ERR(priv->fbdev)) {
@@ -128,11 +129,13 @@ static int kirin_drm_kms_init(struct drm_device *dev)
ret = PTR_ERR(priv->fbdev);
goto err_cleanup_poll;
}
-
+#endif
return 0;
+#ifdef CONFIG_DRM_FBDEV_EMULATION
err_cleanup_poll:
drm_kms_helper_poll_fini(dev);
+#endif
err_unbind_all:
component_unbind_all(dev->dev, dev);
err_dc_cleanup:
--
2.9.0
Powered by blists - more mailing lists