summaryrefslogtreecommitdiff
path: root/drivers/gpu
diff options
context:
space:
mode:
authorArchit Taneja <architt@codeaurora.org>2016-02-12 12:18:30 +0300
committerThierry Reding <treding@nvidia.com>2016-03-02 18:59:04 +0300
commitfc903ebd50d0396b5de1ff614a009c2ddcb3222c (patch)
tree2851754f4330fefaccfa46cbfff5edd5897bcb47 /drivers/gpu
parent92e963f50fc74041b5e9e744c330dca48e04f08d (diff)
downloadlinux-fc903ebd50d0396b5de1ff614a009c2ddcb3222c.tar.xz
drm/dsi: Check for CONFIG_OF when defining of_mipi_dsi_device_add()
of_mipi_dsi_device_add() is used only when CONFIG_OF is enabled. It currently works if OF support is disabled, but this will change when we add more functionality to it. Define the original function if CONFIG_OF is enabled and a dummy function otherwise. Signed-off-by: Archit Taneja <architt@codeaurora.org> Signed-off-by: Thierry Reding <treding@nvidia.com>
Diffstat (limited to 'drivers/gpu')
-rw-r--r--drivers/gpu/drm/drm_mipi_dsi.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/drivers/gpu/drm/drm_mipi_dsi.c b/drivers/gpu/drm/drm_mipi_dsi.c
index 6e6a9c58d404..4f2a70471e05 100644
--- a/drivers/gpu/drm/drm_mipi_dsi.c
+++ b/drivers/gpu/drm/drm_mipi_dsi.c
@@ -129,6 +129,7 @@ static int mipi_dsi_device_add(struct mipi_dsi_device *dsi)
return device_add(&dsi->dev);
}
+#if IS_ENABLED(CONFIG_OF)
static struct mipi_dsi_device *
of_mipi_dsi_device_add(struct mipi_dsi_host *host, struct device_node *node)
{
@@ -170,6 +171,13 @@ of_mipi_dsi_device_add(struct mipi_dsi_host *host, struct device_node *node)
return dsi;
}
+#else
+static struct mipi_dsi_device *
+of_mipi_dsi_device_add(struct mipi_dsi_host *host, struct device_node *node)
+{
+ return ERR_PTR(-ENODEV);
+}
+#endif
int mipi_dsi_host_register(struct mipi_dsi_host *host)
{