Commit 8fa04aae authored by Inki Dae's avatar Inki Dae Committed by Inki Dae

drm/exynos: hdmi: use i2c_adapter instead of i2c_client

This patch changes i2c_client for ddc to i2c_adapter
because ddc needs only i2c_adapter.
Signed-off-by: default avatarInki Dae <inki.dae@samsung.com>
Signed-off-by: default avatarKyungmin Park <kyungmin.park@samsung.com>
parent bfe4e84c
...@@ -186,7 +186,7 @@ struct hdmi_context { ...@@ -186,7 +186,7 @@ struct hdmi_context {
void __iomem *regs; void __iomem *regs;
int irq; int irq;
struct i2c_client *ddc_port; struct i2c_adapter *ddc_adpt;
struct i2c_client *hdmiphy_port; struct i2c_client *hdmiphy_port;
/* current hdmiphy conf regs */ /* current hdmiphy conf regs */
...@@ -829,10 +829,10 @@ static int hdmi_get_modes(struct drm_connector *connector) ...@@ -829,10 +829,10 @@ static int hdmi_get_modes(struct drm_connector *connector)
struct hdmi_context *hdata = ctx_from_connector(connector); struct hdmi_context *hdata = ctx_from_connector(connector);
struct edid *edid; struct edid *edid;
if (!hdata->ddc_port) if (!hdata->ddc_adpt)
return -ENODEV; return -ENODEV;
edid = drm_get_edid(connector, hdata->ddc_port->adapter); edid = drm_get_edid(connector, hdata->ddc_adpt);
if (!edid) if (!edid)
return -ENODEV; return -ENODEV;
...@@ -2106,9 +2106,9 @@ static int hdmi_probe(struct platform_device *pdev) ...@@ -2106,9 +2106,9 @@ static int hdmi_probe(struct platform_device *pdev)
DRM_ERROR("Failed to find ddc node in device tree\n"); DRM_ERROR("Failed to find ddc node in device tree\n");
return -ENODEV; return -ENODEV;
} }
hdata->ddc_port = of_find_i2c_device_by_node(ddc_node); hdata->ddc_adpt = of_find_i2c_adapter_by_node(ddc_node);
if (!hdata->ddc_port) { if (!hdata->ddc_adpt) {
DRM_ERROR("Failed to get ddc i2c client by node\n"); DRM_ERROR("Failed to get ddc i2c adapter by node\n");
return -ENODEV; return -ENODEV;
} }
...@@ -2158,7 +2158,7 @@ static int hdmi_probe(struct platform_device *pdev) ...@@ -2158,7 +2158,7 @@ static int hdmi_probe(struct platform_device *pdev)
err_hdmiphy: err_hdmiphy:
put_device(&hdata->hdmiphy_port->dev); put_device(&hdata->hdmiphy_port->dev);
err_ddc: err_ddc:
put_device(&hdata->ddc_port->dev); put_device(&hdata->ddc_adpt->dev);
return ret; return ret;
} }
...@@ -2169,7 +2169,7 @@ static int hdmi_remove(struct platform_device *pdev) ...@@ -2169,7 +2169,7 @@ static int hdmi_remove(struct platform_device *pdev)
struct hdmi_context *hdata = display->ctx; struct hdmi_context *hdata = display->ctx;
put_device(&hdata->hdmiphy_port->dev); put_device(&hdata->hdmiphy_port->dev);
put_device(&hdata->ddc_port->dev); put_device(&hdata->ddc_adpt->dev);
pm_runtime_disable(&pdev->dev); pm_runtime_disable(&pdev->dev);
return 0; return 0;
......
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