imamnurby/smpl_train_seed8 huggingface dataset:
--- initial
+++ final
@@ -1,34 +1,34 @@
 int drm_writeback_connector_init(struct drm_device *dev, struct drm_writeback_connector *wb_connector, const struct drm_connector_funcs *con_funcs, const struct drm_encoder_helper_funcs *enc_helper_funcs, const u32 *formats, int n_formats) {
   struct drm_property_blob *blob;
   struct drm_connector *connector = &wb_connector->base;
   struct drm_mode_config *config = &dev->mode_config;
   int ret = create_writeback_properties(dev);
   if (ret != 0) return ret;
   blob = drm_property_create_blob(dev, n_formats * sizeof(*formats), formats);
   if (IS_ERR(blob)) return PTR_ERR(blob);
   drm_encoder_helper_add(&wb_connector->encoder, enc_helper_funcs);
   ret = drm_encoder_init(dev, &wb_connector->encoder, &drm_writeback_encoder_funcs, DRM_MODE_ENCODER_VIRTUAL, NULL);
   if (ret) goto fail;
   connector->interlace_allowed = 0;
   ret = drm_connector_init(dev, connector, con_funcs, DRM_MODE_CONNECTOR_WRITEBACK);
   if (ret) goto connector_fail;
-  ret = drm_mode_connector_attach_encoder(connector, &wb_connector->encoder);
+  ret = drm_connector_attach_encoder(connector, &wb_connector->encoder);
   if (ret) goto attach_fail;
   INIT_LIST_HEAD(&wb_connector->job_queue);
   spin_lock_init(&wb_connector->job_lock);
   wb_connector->fence_context = dma_fence_context_alloc(1);
   spin_lock_init(&wb_connector->fence_lock);
   snprintf(wb_connector->timeline_name, sizeof(wb_connector->timeline_name), "CONNECTOR:%d-%s", connector->base.id, connector->name);
   drm_object_attach_property(&connector->base, config->writeback_out_fence_ptr_property, 0);
   drm_object_attach_property(&connector->base, config->writeback_fb_id_property, 0);
   drm_object_attach_property(&connector->base, config->writeback_pixel_formats_property, blob->base.id);
   wb_connector->pixel_formats_blob_ptr = blob;
   return 0;
 attach_fail:
   drm_connector_cleanup(connector);
 connector_fail:
   drm_encoder_cleanup(&wb_connector->encoder);
 fail:
   drm_property_blob_put(blob);
   return ret;
 }<sep>@@
expression e1,e2;
@@
-        drm_mode_connector_attach_encoder
+        drm_connector_attach_encoder
		(e1,e2)
--- initial
+++ final
@@ -1,42 +1,42 @@
 static int analogix_dp_bridge_attach(struct drm_bridge *bridge) {
   struct analogix_dp_device *dp = bridge->driver_private;
   struct drm_encoder *encoder = dp->encoder;
   struct drm_connector *connector = NULL;
   int ret = 0;
   if (!bridge->encoder) {
     DRM_ERROR("Parent encoder object not found");
     return -ENODEV;
   }
   if (!dp->plat_data->skip_connector) {
     connector = &dp->connector;
     connector->polled = DRM_CONNECTOR_POLL_HPD;
     ret = drm_connector_init(dp->drm_dev, connector, &analogix_dp_connector_funcs, DRM_MODE_CONNECTOR_eDP);
     if (ret) {
       DRM_ERROR("Failed to initialize connector with drm\n");
       return ret;
     }
     drm_connector_helper_add(connector, &analogix_dp_connector_helper_funcs);
-    drm_mode_connector_attach_encoder(connector, encoder);
+    drm_connector_attach_encoder(connector, encoder);
   }
   /*
    * NOTE: the connector registration is implemented in analogix
    * platform driver, that to say connector would be exist after
    * plat_data->attch return, that's why we record the connector
    * point after plat attached.
    */
   if (dp->plat_data->attach) {
     ret = dp->plat_data->attach(dp->plat_data, bridge, connector);
     if (ret) {
       DRM_ERROR("Failed at platform attch func\n");
       return ret;
     }
   }
   if (dp->plat_data->panel) {
     ret = drm_panel_attach(dp->plat_data->panel, &dp->connector);
     if (ret) {
       DRM_ERROR("Failed to attach panel\n");
       return ret;
     }
   }
   return 0;
 }<sep>@@
expression e1,e2;
@@
-        drm_mode_connector_attach_encoder
+        drm_connector_attach_encoder
		(e1,e2)
--- initial
+++ final
@@ -1,14 +1,14 @@
 static int tc_bridge_attach(struct drm_bridge *bridge) {
   u32 bus_format = MEDIA_BUS_FMT_RGB888_1X24;
   struct tc_data *tc = bridge_to_tc(bridge);
   struct drm_device *drm = bridge->dev;
   int ret;
   /* Create eDP connector */
   drm_connector_helper_add(&tc->connector, &tc_connector_helper_funcs);
   ret = drm_connector_init(drm, &tc->connector, &tc_connector_funcs, DRM_MODE_CONNECTOR_eDP);
   if (ret) return ret;
   if (tc->panel) drm_panel_attach(tc->panel, &tc->connector);
   drm_display_info_set_bus_formats(&tc->connector.display_info, &bus_format, 1);
-  drm_mode_connector_attach_encoder(&tc->connector, tc->bridge.encoder);
+  drm_connector_attach_encoder(&tc->connector, tc->bridge.encoder);
   return 0;
 }<sep>@@
expression e1,e2;
@@
-        drm_mode_connector_attach_encoder
+        drm_connector_attach_encoder
		(e1,e2)
--- initial
+++ final
@@ -1,52 +1,52 @@
 static int sti_hdmi_bind(struct device *dev, struct device *master, void *data) {
   struct sti_hdmi *hdmi = dev_get_drvdata(dev);
   struct drm_device *drm_dev = data;
   struct drm_encoder *encoder;
   struct sti_hdmi_connector *connector;
   struct drm_connector *drm_connector;
   struct drm_bridge *bridge;
   int err;
   /* Set the drm device handle */
   hdmi->drm_dev = drm_dev;
   encoder = sti_hdmi_find_encoder(drm_dev);
   if (!encoder) return -EINVAL;
   connector = devm_kzalloc(dev, sizeof(*connector), GFP_KERNEL);
   if (!connector) return -EINVAL;
   connector->hdmi = hdmi;
   bridge = devm_kzalloc(dev, sizeof(*bridge), GFP_KERNEL);
   if (!bridge) return -EINVAL;
   bridge->driver_private = hdmi;
   bridge->funcs = &sti_hdmi_bridge_funcs;
   drm_bridge_attach(encoder, bridge, NULL);
   connector->encoder = encoder;
   drm_connector = (struct drm_connector *)connector;
   drm_connector->polled = DRM_CONNECTOR_POLL_HPD;
   drm_connector_init(drm_dev, drm_connector, &sti_hdmi_connector_funcs, DRM_MODE_CONNECTOR_HDMIA);
   drm_connector_helper_add(drm_connector, &sti_hdmi_connector_helper_funcs);
   /* initialise property */
   sti_hdmi_connector_init_property(drm_dev, drm_connector);
   hdmi->drm_connector = drm_connector;
-  err = drm_mode_connector_attach_encoder(drm_connector, encoder);
+  err = drm_connector_attach_encoder(drm_connector, encoder);
   if (err) {
     DRM_ERROR("Failed to attach a connector to a encoder\n");
     goto err_sysfs;
   }
   err = sti_hdmi_register_audio_driver(dev, hdmi);
   if (err) {
     DRM_ERROR("Failed to attach an audio codec\n");
     goto err_sysfs;
   }
   /* Initialize audio infoframe */
   err = hdmi_audio_infoframe_init(&hdmi->audio.cea);
   if (err) {
     DRM_ERROR("Failed to init audio infoframe\n");
     goto err_sysfs;
   }
   /* Enable default interrupts */
   hdmi_write(hdmi, HDMI_DEFAULT_INT, HDMI_INT_EN);
   return 0;
 err_sysfs:
   drm_bridge_remove(bridge);
   hdmi->drm_connector = NULL;
   return -EINVAL;
 }<sep>@@
expression e1,e2;
@@
-        drm_mode_connector_attach_encoder
+        drm_connector_attach_encoder
		(e1,e2)
--- initial
+++ final
@@ -1,49 +1,49 @@
 int sun4i_rgb_init(struct drm_device *drm, struct sun4i_tcon *tcon) {
   struct drm_encoder *encoder;
   struct drm_bridge *bridge;
   struct sun4i_rgb *rgb;
   int ret;
   rgb = devm_kzalloc(drm->dev, sizeof(*rgb), GFP_KERNEL);
   if (!rgb) return -ENOMEM;
   rgb->tcon = tcon;
   encoder = &rgb->encoder;
   ret = drm_of_find_panel_or_bridge(tcon->dev->of_node, 1, 0, &tcon->panel, &bridge);
   if (ret) {
     dev_info(drm->dev, "No panel or bridge found... RGB output disabled\n");
     return 0;
   }
   drm_encoder_helper_add(&rgb->encoder, &sun4i_rgb_enc_helper_funcs);
   ret = drm_encoder_init(drm, &rgb->encoder, &sun4i_rgb_enc_funcs, DRM_MODE_ENCODER_NONE, NULL);
   if (ret) {
     dev_err(drm->dev, "Couldn't initialise the rgb encoder\n");
     goto err_out;
   }
   /* The RGB encoder can only work with the TCON channel 0 */
   rgb->encoder.possible_crtcs = drm_crtc_mask(&tcon->crtc->crtc);
   if (tcon->panel) {
     drm_connector_helper_add(&rgb->connector, &sun4i_rgb_con_helper_funcs);
     ret = drm_connector_init(drm, &rgb->connector, &sun4i_rgb_con_funcs, DRM_MODE_CONNECTOR_Unknown);
     if (ret) {
       dev_err(drm->dev, "Couldn't initialise the rgb connector\n");
       goto err_cleanup_connector;
     }
-    drm_mode_connector_attach_encoder(&rgb->connector, &rgb->encoder);
+    drm_connector_attach_encoder(&rgb->connector, &rgb->encoder);
     ret = drm_panel_attach(tcon->panel, &rgb->connector);
     if (ret) {
       dev_err(drm->dev, "Couldn't attach our panel\n");
       goto err_cleanup_connector;
     }
   }
   if (bridge) {
     ret = drm_bridge_attach(encoder, bridge, NULL);
     if (ret) {
       dev_err(drm->dev, "Couldn't attach our bridge\n");
       goto err_cleanup_connector;
     }
   }
   return 0;
 err_cleanup_connector:
   drm_encoder_cleanup(&rgb->encoder);
 err_out:
   return ret;
 }<sep>@@
expression e1,e2;
@@
-        drm_mode_connector_attach_encoder
+        drm_connector_attach_encoder
		(e1,e2)
--- initial
+++ final
@@ -1,15 +1,15 @@
 static int rcar_lvds_attach(struct drm_bridge *bridge) {
   struct rcar_lvds *lvds = bridge_to_rcar_lvds(bridge);
   struct drm_connector *connector = &lvds->connector;
   struct drm_encoder *encoder = bridge->encoder;
   int ret;
   /* If we have a next bridge just attach it. */
   if (lvds->next_bridge) return drm_bridge_attach(bridge->encoder, lvds->next_bridge, bridge);
   /* Otherwise we have a panel, create a connector. */
   ret = drm_connector_init(bridge->dev, connector, &rcar_lvds_conn_funcs, DRM_MODE_CONNECTOR_LVDS);
   if (ret < 0) return ret;
   drm_connector_helper_add(connector, &rcar_lvds_conn_helper_funcs);
-  ret = drm_mode_connector_attach_encoder(connector, encoder);
+  ret = drm_connector_attach_encoder(connector, encoder);
   if (ret < 0) return ret;
   return drm_panel_attach(lvds->panel, connector);
 }<sep>@@
expression e1,e2;
@@
-        drm_mode_connector_attach_encoder
+        drm_connector_attach_encoder
		(e1,e2)
--- initial
+++ final
@@ -1,28 +1,28 @@
 int nv17_tv_create(struct drm_connector *connector, struct dcb_output *entry) {
   struct drm_device *dev = connector->dev;
   struct drm_encoder *encoder;
   struct nv17_tv_encoder *tv_enc = NULL;
   tv_enc = kzalloc(sizeof(*tv_enc), GFP_KERNEL);
   if (!tv_enc) return -ENOMEM;
   tv_enc->overscan = 50;
   tv_enc->flicker = 50;
   tv_enc->saturation = 50;
   tv_enc->hue = 0;
   tv_enc->tv_norm = TV_NORM_PAL;
   tv_enc->subconnector = DRM_MODE_SUBCONNECTOR_Unknown;
   tv_enc->select_subconnector = DRM_MODE_SUBCONNECTOR_Automatic;
   tv_enc->pin_mask = 0;
   encoder = to_drm_encoder(&tv_enc->base);
   tv_enc->base.dcb = entry;
   tv_enc->base.or = ffs(entry->or) - 1;
   drm_encoder_init(dev, encoder, &nv17_tv_funcs, DRM_MODE_ENCODER_TVDAC, NULL);
   drm_encoder_helper_add(encoder, &nv17_tv_helper_funcs);
   to_encoder_slave(encoder)->slave_funcs = &nv17_tv_slave_funcs;
   tv_enc->base.enc_save = nv17_tv_save;
   tv_enc->base.enc_restore = nv17_tv_restore;
   encoder->possible_crtcs = entry->heads;
   encoder->possible_clones = 0;
   nv17_tv_create_resources(encoder, connector);
-  drm_mode_connector_attach_encoder(connector, encoder);
+  drm_connector_attach_encoder(connector, encoder);
   return 0;
 }<sep>@@
expression e1,e2;
@@
-        drm_mode_connector_attach_encoder
+        drm_connector_attach_encoder
		(e1,e2)
--- initial
+++ final
@@ -1,27 +1,27 @@
 static int sun6i_dsi_bind(struct device *dev, struct device *master, void *data) {
   struct drm_device *drm = data;
   struct sun4i_drv *drv = drm->dev_private;
   struct sun6i_dsi *dsi = dev_get_drvdata(dev);
   int ret;
   if (!dsi->panel) return -EPROBE_DEFER;
   dsi->drv = drv;
   drm_encoder_helper_add(&dsi->encoder, &sun6i_dsi_enc_helper_funcs);
   ret = drm_encoder_init(drm, &dsi->encoder, &sun6i_dsi_enc_funcs, DRM_MODE_ENCODER_DSI, NULL);
   if (ret) {
     dev_err(dsi->dev, "Couldn't initialise the DSI encoder\n");
     return ret;
   }
   dsi->encoder.possible_crtcs = BIT(0);
   drm_connector_helper_add(&dsi->connector, &sun6i_dsi_connector_helper_funcs);
   ret = drm_connector_init(drm, &dsi->connector, &sun6i_dsi_connector_funcs, DRM_MODE_CONNECTOR_DSI);
   if (ret) {
     dev_err(dsi->dev, "Couldn't initialise the DSI connector\n");
     goto err_cleanup_connector;
   }
-  drm_mode_connector_attach_encoder(&dsi->connector, &dsi->encoder);
+  drm_connector_attach_encoder(&dsi->connector, &dsi->encoder);
   drm_panel_attach(dsi->panel, &dsi->connector);
   return 0;
 err_cleanup_connector:
   drm_encoder_cleanup(&dsi->encoder);
   return ret;
 }<sep>@@
expression e1,e2;
@@
-        drm_mode_connector_attach_encoder
+        drm_connector_attach_encoder
		(e1,e2)
--- initial
+++ final
@@ -1,25 +1,25 @@
 int hibmc_vdac_init(struct hibmc_drm_private *priv) {
   struct drm_device *dev = priv->dev;
   struct drm_encoder *encoder;
   struct drm_connector *connector;
   int ret;
   connector = hibmc_connector_init(priv);
   if (IS_ERR(connector)) {
     DRM_ERROR("failed to create connector: %ld\n", PTR_ERR(connector));
     return PTR_ERR(connector);
   }
   encoder = devm_kzalloc(dev->dev, sizeof(*encoder), GFP_KERNEL);
   if (!encoder) {
     DRM_ERROR("failed to alloc memory when init encoder\n");
     return -ENOMEM;
   }
   encoder->possible_crtcs = 0x1;
   ret = drm_encoder_init(dev, encoder, &hibmc_encoder_funcs, DRM_MODE_ENCODER_DAC, NULL);
   if (ret) {
     DRM_ERROR("failed to init encoder: %d\n", ret);
     return ret;
   }
   drm_encoder_helper_add(encoder, &hibmc_encoder_helper_funcs);
-  drm_mode_connector_attach_encoder(connector, encoder);
+  drm_connector_attach_encoder(connector, encoder);
   return 0;
 }<sep>@@
expression e1,e2;
@@
-        drm_mode_connector_attach_encoder
+        drm_connector_attach_encoder
		(e1,e2)
--- initial
+++ final
@@ -1,28 +1,28 @@
 static int vgdev_output_init(struct virtio_gpu_device *vgdev, int index) {
   struct drm_device *dev = vgdev->ddev;
   struct virtio_gpu_output *output = vgdev->outputs + index;
   struct drm_connector *connector = &output->conn;
   struct drm_encoder *encoder = &output->enc;
   struct drm_crtc *crtc = &output->crtc;
   struct drm_plane *primary, *cursor;
   output->index = index;
   if (index == 0) {
     output->info.enabled = cpu_to_le32(true);
     output->info.r.width = cpu_to_le32(XRES_DEF);
     output->info.r.height = cpu_to_le32(YRES_DEF);
   }
   primary = virtio_gpu_plane_init(vgdev, DRM_PLANE_TYPE_PRIMARY, index);
   if (IS_ERR(primary)) return PTR_ERR(primary);
   cursor = virtio_gpu_plane_init(vgdev, DRM_PLANE_TYPE_CURSOR, index);
   if (IS_ERR(cursor)) return PTR_ERR(cursor);
   drm_crtc_init_with_planes(dev, crtc, primary, cursor, &virtio_gpu_crtc_funcs, NULL);
   drm_crtc_helper_add(crtc, &virtio_gpu_crtc_helper_funcs);
   drm_connector_init(dev, connector, &virtio_gpu_connector_funcs, DRM_MODE_CONNECTOR_VIRTUAL);
   drm_connector_helper_add(connector, &virtio_gpu_conn_helper_funcs);
   drm_encoder_init(dev, encoder, &virtio_gpu_enc_funcs, DRM_MODE_ENCODER_VIRTUAL, NULL);
   drm_encoder_helper_add(encoder, &virtio_gpu_enc_helper_funcs);
   encoder->possible_crtcs = 1 << index;
-  drm_mode_connector_attach_encoder(connector, encoder);
+  drm_connector_attach_encoder(connector, encoder);
   drm_connector_register(connector);
   return 0;
 }<sep>@@
expression e1,e2;
@@
-        drm_mode_connector_attach_encoder
+        drm_connector_attach_encoder
		(e1,e2)
--- initial
+++ final
@@ -1,24 +1,24 @@
 int tegra_dc_rgb_init(struct drm_device *drm, struct tegra_dc *dc) {
   struct tegra_output *output = dc->rgb;
   int err;
   if (!dc->rgb) return -ENODEV;
   drm_connector_init(drm, &output->connector, &tegra_rgb_connector_funcs, DRM_MODE_CONNECTOR_LVDS);
   drm_connector_helper_add(&output->connector, &tegra_rgb_connector_helper_funcs);
   output->connector.dpms = DRM_MODE_DPMS_OFF;
   drm_encoder_init(drm, &output->encoder, &tegra_rgb_encoder_funcs, DRM_MODE_ENCODER_LVDS, NULL);
   drm_encoder_helper_add(&output->encoder, &tegra_rgb_encoder_helper_funcs);
-  drm_mode_connector_attach_encoder(&output->connector, &output->encoder);
+  drm_connector_attach_encoder(&output->connector, &output->encoder);
   drm_connector_register(&output->connector);
   err = tegra_output_init(drm, output);
   if (err < 0) {
     dev_err(output->dev, "failed to initialize output: %d\n", err);
     return err;
   }
   /*
    * Other outputs can be attached to either display controller. The RGB
    * outputs are an exception and work only with their parent display
    * controller.
    */
   output->encoder.possible_crtcs = drm_crtc_mask(&dc->base);
   return 0;
 }<sep>@@
expression e1,e2;
@@
-        drm_mode_connector_attach_encoder
+        drm_connector_attach_encoder
		(e1,e2)
--- initial
+++ final
@@ -1,36 +1,36 @@
 int nv04_tv_create(struct drm_connector *connector, struct dcb_output *entry) {
   struct nouveau_encoder *nv_encoder;
   struct drm_encoder *encoder;
   struct drm_device *dev = connector->dev;
   struct nouveau_drm *drm = nouveau_drm(dev);
   struct nvkm_i2c *i2c = nvxx_i2c(&drm->client.device);
   struct nvkm_i2c_bus *bus = nvkm_i2c_bus_find(i2c, entry->i2c_index);
   int type, ret;
   /* Ensure that we can talk to this encoder */
   type = nv04_tv_identify(dev, entry->i2c_index);
   if (type < 0) return type;
   /* Allocate the necessary memory */
   nv_encoder = kzalloc(sizeof(*nv_encoder), GFP_KERNEL);
   if (!nv_encoder) return -ENOMEM;
   /* Initialize the common members */
   encoder = to_drm_encoder(nv_encoder);
   drm_encoder_init(dev, encoder, &nv04_tv_funcs, DRM_MODE_ENCODER_TVDAC, NULL);
   drm_encoder_helper_add(encoder, &nv04_tv_helper_funcs);
   nv_encoder->enc_save = drm_i2c_encoder_save;
   nv_encoder->enc_restore = drm_i2c_encoder_restore;
   encoder->possible_crtcs = entry->heads;
   encoder->possible_clones = 0;
   nv_encoder->dcb = entry;
   nv_encoder->or = ffs(entry->or) - 1;
   /* Run the slave-specific initialization */
   ret = drm_i2c_encoder_init(dev, to_encoder_slave(encoder), &bus->i2c, &nv04_tv_encoder_info[type].dev);
   if (ret < 0) goto fail_cleanup;
   /* Attach it to the specified connector. */
   get_slave_funcs(encoder)->create_resources(encoder, connector);
-  drm_mode_connector_attach_encoder(connector, encoder);
+  drm_connector_attach_encoder(connector, encoder);
   return 0;
 fail_cleanup:
   drm_encoder_cleanup(encoder);
   kfree(nv_encoder);
   return ret;
 }<sep>@@
expression e1,e2;
@@
-        drm_mode_connector_attach_encoder
+        drm_connector_attach_encoder
		(e1,e2)
--- initial
+++ final
@@ -1,25 +1,25 @@
 static int dce_virtual_connector_encoder_init(struct amdgpu_device *adev, int index) {
   struct drm_encoder *encoder;
   struct drm_connector *connector;
   /* add a new encoder */
   encoder = kzalloc(sizeof(struct drm_encoder), GFP_KERNEL);
   if (!encoder) return -ENOMEM;
   encoder->possible_crtcs = 1 << index;
   drm_encoder_init(adev->ddev, encoder, &dce_virtual_encoder_funcs, DRM_MODE_ENCODER_VIRTUAL, NULL);
   drm_encoder_helper_add(encoder, &dce_virtual_encoder_helper_funcs);
   connector = kzalloc(sizeof(struct drm_connector), GFP_KERNEL);
   if (!connector) {
     kfree(encoder);
     return -ENOMEM;
   }
   /* add a new connector */
   drm_connector_init(adev->ddev, connector, &dce_virtual_connector_funcs, DRM_MODE_CONNECTOR_VIRTUAL);
   drm_connector_helper_add(connector, &dce_virtual_connector_helper_funcs);
   connector->display_info.subpixel_order = SubPixelHorizontalRGB;
   connector->interlace_allowed = false;
   connector->doublescan_allowed = false;
   drm_connector_register(connector);
   /* link them */
-  drm_mode_connector_attach_encoder(connector, encoder);
+  drm_connector_attach_encoder(connector, encoder);
   return 0;
 }<sep>@@
expression e1,e2;
@@
-        drm_mode_connector_attach_encoder
+        drm_connector_attach_encoder
		(e1,e2)
--- initial
+++ final
@@ -1,4 +1,4 @@
 void gma_connector_attach_encoder(struct gma_connector *connector, struct gma_encoder *encoder) {
   connector->encoder = encoder;
-  drm_mode_connector_attach_encoder(&connector->base, &encoder->base);
+  drm_connector_attach_encoder(&connector->base, &encoder->base);
 }<sep>@@
expression e1,e2;
@@
-        drm_mode_connector_attach_encoder
+        drm_connector_attach_encoder
		(e1,e2)
--- initial
+++ final
@@ -1,16 +1,16 @@
 struct drm_connector *mdp4_lvds_connector_init(struct drm_device *dev, struct device_node *panel_node, struct drm_encoder *encoder) {
   struct drm_connector *connector = NULL;
   struct mdp4_lvds_connector *mdp4_lvds_connector;
   mdp4_lvds_connector = kzalloc(sizeof(*mdp4_lvds_connector), GFP_KERNEL);
   if (!mdp4_lvds_connector) return ERR_PTR(-ENOMEM);
   mdp4_lvds_connector->encoder = encoder;
   mdp4_lvds_connector->panel_node = panel_node;
   connector = &mdp4_lvds_connector->base;
   drm_connector_init(dev, connector, &mdp4_lvds_connector_funcs, DRM_MODE_CONNECTOR_LVDS);
   drm_connector_helper_add(connector, &mdp4_lvds_connector_helper_funcs);
   connector->polled = 0;
   connector->interlace_allowed = 0;
   connector->doublescan_allowed = 0;
-  drm_mode_connector_attach_encoder(connector, encoder);
+  drm_connector_attach_encoder(connector, encoder);
   return connector;
 }<sep>@@
expression e1,e2;
@@
-        drm_mode_connector_attach_encoder
+        drm_connector_attach_encoder
		(e1,e2)
--- initial
+++ final
@@ -1,19 +1,19 @@
 static int hdmi_create_connector(struct drm_encoder *encoder) {
   struct hdmi_context *hdata = encoder_to_hdmi(encoder);
   struct drm_connector *connector = &hdata->connector;
   int ret;
   connector->interlace_allowed = true;
   connector->polled = DRM_CONNECTOR_POLL_HPD;
   ret = drm_connector_init(hdata->drm_dev, connector, &hdmi_connector_funcs, DRM_MODE_CONNECTOR_HDMIA);
   if (ret) {
     DRM_ERROR("Failed to initialize connector with drm\n");
     return ret;
   }
   drm_connector_helper_add(connector, &hdmi_connector_helper_funcs);
-  drm_mode_connector_attach_encoder(connector, encoder);
+  drm_connector_attach_encoder(connector, encoder);
   if (hdata->bridge) {
     ret = drm_bridge_attach(encoder, hdata->bridge, NULL);
     if (ret) DRM_ERROR("Failed to attach bridge\n");
   }
   return ret;
 }<sep>@@
expression e1,e2;
@@
-        drm_mode_connector_attach_encoder
+        drm_connector_attach_encoder
		(e1,e2)
--- initial
+++ final
@@ -1,31 +1,31 @@
 int cirrus_modeset_init(struct cirrus_device *cdev) {
   struct drm_encoder *encoder;
   struct drm_connector *connector;
   int ret;
   drm_mode_config_init(cdev->dev);
   cdev->mode_info.mode_config_initialized = true;
   cdev->dev->mode_config.max_width = CIRRUS_MAX_FB_WIDTH;
   cdev->dev->mode_config.max_height = CIRRUS_MAX_FB_HEIGHT;
   cdev->dev->mode_config.fb_base = cdev->mc.vram_base;
   cdev->dev->mode_config.preferred_depth = 24;
   /* don't prefer a shadow on virt GPU */
   cdev->dev->mode_config.prefer_shadow = 0;
   cirrus_crtc_init(cdev->dev);
   encoder = cirrus_encoder_init(cdev->dev);
   if (!encoder) {
     DRM_ERROR("cirrus_encoder_init failed\n");
     return -1;
   }
   connector = cirrus_vga_init(cdev->dev);
   if (!connector) {
     DRM_ERROR("cirrus_vga_init failed\n");
     return -1;
   }
-  drm_mode_connector_attach_encoder(connector, encoder);
+  drm_connector_attach_encoder(connector, encoder);
   ret = cirrus_fbdev_init(cdev);
   if (ret) {
     DRM_ERROR("cirrus_fbdev_init failed\n");
     return ret;
   }
   return 0;
 }<sep>@@
expression e1,e2;
@@
-        drm_mode_connector_attach_encoder
+        drm_connector_attach_encoder
		(e1,e2)