]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
drm/dsi: check for CONFIG_OF when defining of_mipi_dsi_device_add
authorArchit Taneja <architt@codeaurora.org>
Thu, 10 Dec 2015 12:41:35 +0000 (18:11 +0530)
committerNicolas Dechesne <nicolas.dechesne@linaro.org>
Tue, 3 May 2016 22:07:07 +0000 (00:07 +0200)
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 func if CONFIG_OF is enabled. Define a dummy func
otherwise.

Signed-off-by: Archit Taneja <architt@codeaurora.org>
Signed-off-by: Amit Kucheria <amit.kucheria@linaro.org>
Signed-off-by: Nicolas Dechesne <nicolas.dechesne@linaro.org>
drivers/gpu/drm/drm_mipi_dsi.c

index e487f56ffc4c5367ca0d2b2ace642611f11578d5..2caf07ba625ef3d6214381d40cf3b12946154025 100644 (file)
@@ -183,6 +183,7 @@ err:
        return ERR_PTR(r);
 }
 
+#if IS_ENABLED(CONFIG_OF)
 static struct mipi_dsi_device *
 of_mipi_dsi_device_add(struct mipi_dsi_host *host, struct device_node *node)
 {
@@ -206,6 +207,13 @@ of_mipi_dsi_device_add(struct mipi_dsi_host *host, struct device_node *node)
 
        return mipi_dsi_device_new(host, &info);
 }
+#else
+static struct mipi_dsi_device *
+of_mipi_dsi_device_add(struct mipi_dsi_host *host, struct device_node *node)
+{
+       return NULL;
+}
+#endif
 
 static struct mipi_dsi_driver dummy_dsi_driver = {
        .driver.name = "mipi_dsi_dummy",