Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1332611

[PATCH v5 1/5] drm/dsi: check for CONFIG_OF when defining of_mipi_dsi_device_add

From Archit Taneja <architt@codeaurora.org>
Newsgroups linux.kernel
Subject [PATCH v5 1/5] drm/dsi: check for CONFIG_OF when defining of_mipi_dsi_device_add
Date 2016-02-12 10:30 +0100
Message-ID <r1id5-51c-27@gated-at.bofh.it> (permalink)
References <qE8Pv-6ig-5@gated-at.bofh.it> <r1i3o-4XY-3@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


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>
---
 drivers/gpu/drm/drm_mipi_dsi.c | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/drivers/gpu/drm/drm_mipi_dsi.c b/drivers/gpu/drm/drm_mipi_dsi.c
index 6e6a9c5..4f2a704 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)
 {
-- 
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum,
hosted by The Linux Foundation

Back to linux.kernel | Previous | NextPrevious in thread | Find similar | Unroll thread


Thread

[PATCH v5 0/5] drm/dsi: DSI for devices with different control bus Archit Taneja <architt@codeaurora.org> - 2016-02-12 10:20 +0100
  [PATCH v5 4/5] drm/dsi: Add routine to unregister a DSI device Archit Taneja <architt@codeaurora.org> - 2016-02-12 10:20 +0100
  [PATCH v5 5/5] drm/dsi: Get DSI host by DT device node Archit Taneja <architt@codeaurora.org> - 2016-02-12 10:20 +0100
  [PATCH v5 1/5] drm/dsi: check for CONFIG_OF when defining of_mipi_dsi_device_add Archit Taneja <architt@codeaurora.org> - 2016-02-12 10:30 +0100

csiph-web