@@ -109,7 +109,6 @@ struct imx_tve {
struct regmap *regmap;
struct regulator *dac_reg;
- struct i2c_adapter *ddc;
struct clk *clk;
struct clk *di_sel_clk;
struct clk_hw clk_hw_di;
@@ -218,14 +217,13 @@ static int tve_setup_vga(struct imx_tve *tve)
static int imx_tve_connector_get_modes(struct drm_connector *connector)
{
- struct imx_tve *tve = con_to_tve(connector);
struct edid *edid;
int ret = 0;
- if (!tve->ddc)
+ if (!connector->ddc)
return 0;
- edid = drm_get_edid(connector, tve->ddc);
+ edid = drm_get_edid(connector, connector->ddc);
if (edid) {
drm_connector_update_edid_property(connector, edid);
ret = drm_add_edid_modes(connector, edid);
@@ -551,7 +549,7 @@ static int imx_tve_bind(struct device *dev, struct device *master, void *data)
ddc_node = of_parse_phandle(np, "ddc-i2c-bus", 0);
if (ddc_node) {
- tve->ddc = of_find_i2c_adapter_by_node(ddc_node);
+ tve->connector.ddc = of_find_i2c_adapter_by_node(ddc_node);
of_node_put(ddc_node);
}
Use the ddc pointer provided by the generic connector. Signed-off-by: Andrzej Pietrasiewicz <andrzej.p@collabora.com> --- drivers/gpu/drm/imx/imx-tve.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-)