From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751850AbcBLJVS (ORCPT ); Fri, 12 Feb 2016 04:21:18 -0500 Received: from smtp.codeaurora.org ([198.145.29.96]:58231 "EHLO smtp.codeaurora.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751061AbcBLJSp (ORCPT ); Fri, 12 Feb 2016 04:18:45 -0500 From: Archit Taneja To: dri-devel@lists.freedesktop.org, treding@nvidia.com Cc: linux-kernel@vger.kernel.org, a.hajda@samsung.com, airlied@linux.ie, daniel@ffwll.ch, l.stach@pengutronix.de, robh@kernel.org, linux-arm-msm@vger.kernel.org, jani.nikula@linux.intel.com, Archit Taneja Subject: [PATCH v5 1/5] drm/dsi: check for CONFIG_OF when defining of_mipi_dsi_device_add Date: Fri, 12 Feb 2016 14:48:30 +0530 Message-Id: <1455268714-28755-2-git-send-email-architt@codeaurora.org> X-Mailer: git-send-email 1.8.2.1 In-Reply-To: <1455268714-28755-1-git-send-email-architt@codeaurora.org> References: <1449751300-2841-1-git-send-email-architt@codeaurora.org> <1455268714-28755-1-git-send-email-architt@codeaurora.org> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 --- 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