From: Inki Dae Subject: [PATCH 2/2] drm/exynos: hdmi: use i2c_adapter instead of i2c_client Date: Thu, 13 Mar 2014 16:42:48 +0900 Message-ID: <1394696568-32281-2-git-send-email-inki.dae@samsung.com> References: <1394696568-32281-1-git-send-email-inki.dae@samsung.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mailout1.samsung.com (mailout1.samsung.com [203.254.224.24]) by gabe.freedesktop.org (Postfix) with ESMTP id 70381FAD67 for ; Thu, 13 Mar 2014 00:42:55 -0700 (PDT) Received: from epcpsbgr5.samsung.com (u145.gpu120.samsung.co.kr [203.254.230.145]) by mailout1.samsung.com (Oracle Communications Messaging Server 7u4-24.01 (7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTP id <0N2D005T66RD56B0@mailout1.samsung.com> for dri-devel@lists.freedesktop.org; Thu, 13 Mar 2014 16:42:49 +0900 (KST) In-reply-to: <1394696568-32281-1-git-send-email-inki.dae@samsung.com> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: dri-devel-bounces@lists.freedesktop.org Errors-To: dri-devel-bounces@lists.freedesktop.org To: airlied@linux.ie, dri-devel@lists.freedesktop.org Cc: kyungmin.park@samsung.com List-Id: dri-devel@lists.freedesktop.org This patch changes i2c_client for ddc to i2c_adapter because ddc needs only i2c_adapter. Signed-off-by: Inki Dae Signed-off-by: Kyungmin Park --- drivers/gpu/drm/exynos/exynos_hdmi.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/drivers/gpu/drm/exynos/exynos_hdmi.c b/drivers/gpu/drm/exynos/exynos_hdmi.c index b695398..a060363 100644 --- a/drivers/gpu/drm/exynos/exynos_hdmi.c +++ b/drivers/gpu/drm/exynos/exynos_hdmi.c @@ -184,7 +184,7 @@ struct hdmi_context { void __iomem *regs; int irq; - struct i2c_client *ddc_port; + struct i2c_adapter *ddc_adpt; struct i2c_client *hdmiphy_port; /* current hdmiphy conf regs */ @@ -765,10 +765,10 @@ static int hdmi_get_modes(struct drm_connector *connector) struct hdmi_context *hdata = ctx_from_connector(connector); struct edid *edid; - if (!hdata->ddc_port) + if (!hdata->ddc_adpt) return -ENODEV; - edid = drm_get_edid(connector, hdata->ddc_port->adapter); + edid = drm_get_edid(connector, hdata->ddc_adpt); if (!edid) return -ENODEV; @@ -2040,9 +2040,9 @@ static int hdmi_probe(struct platform_device *pdev) DRM_ERROR("Failed to find ddc node in device tree\n"); return -ENODEV; } - hdata->ddc_port = of_find_i2c_device_by_node(ddc_node); - if (!hdata->ddc_port) { - DRM_ERROR("Failed to get ddc i2c client by node\n"); + hdata->ddc_adpt = of_find_i2c_adapter_by_node(ddc_node); + if (!hdata->ddc_adpt) { + DRM_ERROR("Failed to get ddc i2c adapter by node\n"); return -ENODEV; } @@ -2092,7 +2092,7 @@ static int hdmi_probe(struct platform_device *pdev) err_hdmiphy: put_device(&hdata->hdmiphy_port->dev); err_ddc: - put_device(&hdata->ddc_port->dev); + put_device(&hdata->ddc_adpt->dev); return ret; } @@ -2103,7 +2103,7 @@ static int hdmi_remove(struct platform_device *pdev) struct hdmi_context *hdata = display->ctx; put_device(&hdata->hdmiphy_port->dev); - put_device(&hdata->ddc_port->dev); + put_device(&hdata->ddc_adpt->dev); pm_runtime_disable(&pdev->dev); return 0; -- 1.7.9.5