Commit fc903ebd authored by Archit Taneja's avatar Archit Taneja Committed by Thierry Reding

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: default avatarArchit Taneja <architt@codeaurora.org>
Signed-off-by: default avatarThierry Reding <treding@nvidia.com>
parent 92e963f5
...@@ -129,6 +129,7 @@ static int mipi_dsi_device_add(struct mipi_dsi_device *dsi) ...@@ -129,6 +129,7 @@ static int mipi_dsi_device_add(struct mipi_dsi_device *dsi)
return device_add(&dsi->dev); return device_add(&dsi->dev);
} }
#if IS_ENABLED(CONFIG_OF)
static struct mipi_dsi_device * static struct mipi_dsi_device *
of_mipi_dsi_device_add(struct mipi_dsi_host *host, struct device_node *node) 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) ...@@ -170,6 +171,13 @@ of_mipi_dsi_device_add(struct mipi_dsi_host *host, struct device_node *node)
return dsi; 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) int mipi_dsi_host_register(struct mipi_dsi_host *host)
{ {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment