--- initial
+++ final
@@ -1,133 +1,133 @@
 static int sun4i_hdmi_bind(struct device *dev, struct device *master, void *data) {
   struct platform_device *pdev = to_platform_device(dev);
   struct drm_device *drm = data;
   struct sun4i_drv *drv = drm->dev_private;
   struct sun4i_hdmi *hdmi;
   struct resource *res;
   u32 reg;
   int ret;
   hdmi = devm_kzalloc(dev, sizeof(*hdmi), GFP_KERNEL);
   if (!hdmi) return -ENOMEM;
   dev_set_drvdata(dev, hdmi);
   hdmi->dev = dev;
   hdmi->drv = drv;
   hdmi->variant = of_device_get_match_data(dev);
   if (!hdmi->variant) return -EINVAL;
   res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
   hdmi->base = devm_ioremap_resource(dev, res);
   if (IS_ERR(hdmi->base)) {
     dev_err(dev, "Couldn't map the HDMI encoder registers\n");
     return PTR_ERR(hdmi->base);
   }
   if (hdmi->variant->has_reset_control) {
     hdmi->reset = devm_reset_control_get(dev, NULL);
     if (IS_ERR(hdmi->reset)) {
       dev_err(dev, "Couldn't get the HDMI reset control\n");
       return PTR_ERR(hdmi->reset);
     }
     ret = reset_control_deassert(hdmi->reset);
     if (ret) {
       dev_err(dev, "Couldn't deassert HDMI reset\n");
       return ret;
     }
   }
   hdmi->bus_clk = devm_clk_get(dev, "ahb");
   if (IS_ERR(hdmi->bus_clk)) {
     dev_err(dev, "Couldn't get the HDMI bus clock\n");
     ret = PTR_ERR(hdmi->bus_clk);
     goto err_assert_reset;
   }
   clk_prepare_enable(hdmi->bus_clk);
   hdmi->mod_clk = devm_clk_get(dev, "mod");
   if (IS_ERR(hdmi->mod_clk)) {
     dev_err(dev, "Couldn't get the HDMI mod clock\n");
     ret = PTR_ERR(hdmi->mod_clk);
     goto err_disable_bus_clk;
   }
   clk_prepare_enable(hdmi->mod_clk);
   hdmi->pll0_clk = devm_clk_get(dev, "pll-0");
   if (IS_ERR(hdmi->pll0_clk)) {
     dev_err(dev, "Couldn't get the HDMI PLL 0 clock\n");
     ret = PTR_ERR(hdmi->pll0_clk);
     goto err_disable_mod_clk;
   }
   hdmi->pll1_clk = devm_clk_get(dev, "pll-1");
   if (IS_ERR(hdmi->pll1_clk)) {
     dev_err(dev, "Couldn't get the HDMI PLL 1 clock\n");
     ret = PTR_ERR(hdmi->pll1_clk);
     goto err_disable_mod_clk;
   }
   hdmi->regmap = devm_regmap_init_mmio(dev, hdmi->base, &sun4i_hdmi_regmap_config);
   if (IS_ERR(hdmi->regmap)) {
     dev_err(dev, "Couldn't create HDMI encoder regmap\n");
     ret = PTR_ERR(hdmi->regmap);
     goto err_disable_mod_clk;
   }
   ret = sun4i_tmds_create(hdmi);
   if (ret) {
     dev_err(dev, "Couldn't create the TMDS clock\n");
     goto err_disable_mod_clk;
   }
   if (hdmi->variant->has_ddc_parent_clk) {
     hdmi->ddc_parent_clk = devm_clk_get(dev, "ddc");
     if (IS_ERR(hdmi->ddc_parent_clk)) {
       dev_err(dev, "Couldn't get the HDMI DDC clock\n");
       ret = PTR_ERR(hdmi->ddc_parent_clk);
       goto err_disable_mod_clk;
     }
   } else {
     hdmi->ddc_parent_clk = hdmi->tmds_clk;
   }
   writel(SUN4I_HDMI_CTRL_ENABLE, hdmi->base + SUN4I_HDMI_CTRL_REG);
   writel(hdmi->variant->pad_ctrl0_init_val, hdmi->base + SUN4I_HDMI_PAD_CTRL0_REG);
   reg = readl(hdmi->base + SUN4I_HDMI_PLL_CTRL_REG);
   reg &= SUN4I_HDMI_PLL_CTRL_DIV_MASK;
   reg |= hdmi->variant->pll_ctrl_init_val;
   writel(reg, hdmi->base + SUN4I_HDMI_PLL_CTRL_REG);
   ret = sun4i_hdmi_i2c_create(dev, hdmi);
   if (ret) {
     dev_err(dev, "Couldn't create the HDMI I2C adapter\n");
     goto err_disable_mod_clk;
   }
   drm_encoder_helper_add(&hdmi->encoder, &sun4i_hdmi_helper_funcs);
   ret = drm_encoder_init(drm, &hdmi->encoder, &sun4i_hdmi_funcs, DRM_MODE_ENCODER_TMDS, NULL);
   if (ret) {
     dev_err(dev, "Couldn't initialise the HDMI encoder\n");
     goto err_del_i2c_adapter;
   }
   hdmi->encoder.possible_crtcs = drm_of_find_possible_crtcs(drm, dev->of_node);
   if (!hdmi->encoder.possible_crtcs) {
     ret = -EPROBE_DEFER;
     goto err_del_i2c_adapter;
   }
 #ifdef CONFIG_DRM_SUN4I_HDMI_CEC
   hdmi->cec_adap = cec_pin_allocate_adapter(&sun4i_hdmi_cec_pin_ops, hdmi, "sun4i", CEC_CAP_TRANSMIT | CEC_CAP_LOG_ADDRS | CEC_CAP_PASSTHROUGH | CEC_CAP_RC);
   ret = PTR_ERR_OR_ZERO(hdmi->cec_adap);
   if (ret < 0) goto err_cleanup_connector;
   writel(readl(hdmi->base + SUN4I_HDMI_CEC) & ~SUN4I_HDMI_CEC_TX, hdmi->base + SUN4I_HDMI_CEC);
 #endif
   drm_connector_helper_add(&hdmi->connector, &sun4i_hdmi_connector_helper_funcs);
   ret = drm_connector_init(drm, &hdmi->connector, &sun4i_hdmi_connector_funcs, DRM_MODE_CONNECTOR_HDMIA);
   if (ret) {
     dev_err(dev, "Couldn't initialise the HDMI connector\n");
     goto err_cleanup_connector;
   }
   /* There is no HPD interrupt, so we need to poll the controller */
   hdmi->connector.polled = DRM_CONNECTOR_POLL_CONNECT | DRM_CONNECTOR_POLL_DISCONNECT;
   ret = cec_register_adapter(hdmi->cec_adap, dev);
   if (ret < 0) goto err_cleanup_connector;
-  drm_mode_connector_attach_encoder(&hdmi->connector, &hdmi->encoder);
+  drm_connector_attach_encoder(&hdmi->connector, &hdmi->encoder);
   return 0;
 err_cleanup_connector:
   cec_delete_adapter(hdmi->cec_adap);
   drm_encoder_cleanup(&hdmi->encoder);
 err_del_i2c_adapter:
   i2c_del_adapter(hdmi->i2c);
 err_disable_mod_clk:
   clk_disable_unprepare(hdmi->mod_clk);
 err_disable_bus_clk:
   clk_disable_unprepare(hdmi->bus_clk);
 err_assert_reset:
   reset_control_assert(hdmi->reset);
   return ret;
 }<sep>@@
expression e1,e2;
@@
-        drm_mode_connector_attach_encoder
+        drm_connector_attach_encoder
		(e1,e2)