imamnurby/smpl_train_seed8 huggingface dataset:
--- initial
+++ final
@@ -1,26 +1,26 @@
 int amdgpu_fbdev_init(struct amdgpu_device *adev) {
   struct amdgpu_fbdev *rfbdev;
   int bpp_sel = 32;
   int ret;
   /* don't init fbdev on hw without DCE */
   if (!adev->mode_info.mode_config_initialized) return 0;
   /* don't init fbdev if there are no connectors */
   if (list_empty(&adev->ddev->mode_config.connector_list)) return 0;
   /* select 8 bpp console on low vram cards */
   if (adev->mc.real_vram_size <= (32 * 1024 * 1024)) bpp_sel = 8;
   rfbdev = kzalloc(sizeof(struct amdgpu_fbdev), GFP_KERNEL);
   if (!rfbdev) return -ENOMEM;
   rfbdev->adev = adev;
   adev->mode_info.rfbdev = rfbdev;
   drm_fb_helper_prepare(adev->ddev, &rfbdev->helper, &amdgpu_fb_helper_funcs);
-  ret = drm_fb_helper_init(adev->ddev, &rfbdev->helper, adev->mode_info.num_crtc, AMDGPUFB_CONN_LIMIT);
+  ret = drm_fb_helper_init(adev->ddev, &rfbdev->helper, AMDGPUFB_CONN_LIMIT);
   if (ret) {
     kfree(rfbdev);
     return ret;
   }
   drm_fb_helper_single_add_all_connectors(&rfbdev->helper);
   /* disable all the possible outputs/crtcs before entering KMS mode */
   drm_helper_disable_unused_functions(adev->ddev);
   drm_fb_helper_initial_config(&rfbdev->helper, bpp_sel);
   return 0;
 }<sep>@@
expression A,B,C,D,E;
@@
(
- drm_fb_helper_init(A,B,C,D)
+ drm_fb_helper_init(A,B,D)
|
- drm_fbdev_cma_init_with_funcs(A,B,C,D,E)
+ drm_fbdev_cma_init_with_funcs(A,B,D,E)
|
- drm_fbdev_cma_init(A,B,C,D)
+ drm_fbdev_cma_init(A,B,D)
)
--- initial
+++ final
@@ -1,42 +1,42 @@
 static int arcpgu_load(struct drm_device *drm) {
   struct platform_device *pdev = to_platform_device(drm->dev);
   struct arcpgu_drm_private *arcpgu;
   struct device_node *encoder_node;
   struct resource *res;
   int ret;
   arcpgu = devm_kzalloc(&pdev->dev, sizeof(*arcpgu), GFP_KERNEL);
   if (arcpgu == NULL) return -ENOMEM;
   drm->dev_private = arcpgu;
   arcpgu->clk = devm_clk_get(drm->dev, "pxlclk");
   if (IS_ERR(arcpgu->clk)) return PTR_ERR(arcpgu->clk);
   arcpgu_setup_mode_config(drm);
   res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
   arcpgu->regs = devm_ioremap_resource(&pdev->dev, res);
   if (IS_ERR(arcpgu->regs)) return PTR_ERR(arcpgu->regs);
   dev_info(drm->dev, "arc_pgu ID: 0x%x\n", arc_pgu_read(arcpgu, ARCPGU_REG_ID));
   /* Get the optional framebuffer memory resource */
   ret = of_reserved_mem_device_init(drm->dev);
   if (ret && ret != -ENODEV) return ret;
   if (dma_set_mask_and_coherent(drm->dev, DMA_BIT_MASK(32))) return -ENODEV;
   if (arc_pgu_setup_crtc(drm) < 0) return -ENODEV;
   /* find the encoder node and initialize it */
   encoder_node = of_parse_phandle(drm->dev->of_node, "encoder-slave", 0);
   if (encoder_node) {
     ret = arcpgu_drm_hdmi_init(drm, encoder_node);
     of_node_put(encoder_node);
     if (ret < 0) return ret;
   } else {
     ret = arcpgu_drm_sim_init(drm, NULL);
     if (ret < 0) return ret;
   }
   drm_mode_config_reset(drm);
   drm_kms_helper_poll_init(drm);
-  arcpgu->fbdev = drm_fbdev_cma_init(drm, 16, drm->mode_config.num_crtc, drm->mode_config.num_connector);
+  arcpgu->fbdev = drm_fbdev_cma_init(drm, 16, drm->mode_config.num_connector);
   if (IS_ERR(arcpgu->fbdev)) {
     ret = PTR_ERR(arcpgu->fbdev);
     arcpgu->fbdev = NULL;
     return -ENODEV;
   }
   platform_set_drvdata(pdev, arcpgu);
   return 0;
 }<sep>@@
expression A,B,C,D,E;
@@
(
- drm_fb_helper_init(A,B,C,D)
+ drm_fb_helper_init(A,B,D)
|
- drm_fbdev_cma_init_with_funcs(A,B,C,D,E)
+ drm_fbdev_cma_init_with_funcs(A,B,D,E)
|
- drm_fbdev_cma_init(A,B,C,D)
+ drm_fbdev_cma_init(A,B,D)
)
--- initial
+++ final
@@ -1,31 +1,31 @@
 int armada_fbdev_init(struct drm_device *dev) {
   struct armada_private *priv = dev->dev_private;
   struct drm_fb_helper *fbh;
   int ret;
   fbh = devm_kzalloc(dev->dev, sizeof(*fbh), GFP_KERNEL);
   if (!fbh) return -ENOMEM;
   priv->fbdev = fbh;
   drm_fb_helper_prepare(dev, fbh, &armada_fb_helper_funcs);
-  ret = drm_fb_helper_init(dev, fbh, 1, 1);
+  ret = drm_fb_helper_init(dev, fbh, 1);
   if (ret) {
     DRM_ERROR("failed to initialize drm fb helper\n");
     goto err_fb_helper;
   }
   ret = drm_fb_helper_single_add_all_connectors(fbh);
   if (ret) {
     DRM_ERROR("failed to add fb connectors\n");
     goto err_fb_setup;
   }
   ret = drm_fb_helper_initial_config(fbh, 32);
   if (ret) {
     DRM_ERROR("failed to set initial config\n");
     goto err_fb_setup;
   }
   return 0;
 err_fb_setup:
   drm_fb_helper_release_fbi(fbh);
   drm_fb_helper_fini(fbh);
 err_fb_helper:
   priv->fbdev = NULL;
   return ret;
 }<sep>@@
expression A,B,C,D,E;
@@
(
- drm_fb_helper_init(A,B,C,D)
+ drm_fb_helper_init(A,B,D)
|
- drm_fbdev_cma_init_with_funcs(A,B,C,D,E)
+ drm_fbdev_cma_init_with_funcs(A,B,D,E)
|
- drm_fbdev_cma_init(A,B,C,D)
+ drm_fbdev_cma_init(A,B,D)
)
--- initial
+++ final
@@ -1,24 +1,24 @@
 int ast_fbdev_init(struct drm_device *dev) {
   struct ast_private *ast = dev->dev_private;
   struct ast_fbdev *afbdev;
   int ret;
   afbdev = kzalloc(sizeof(struct ast_fbdev), GFP_KERNEL);
   if (!afbdev) return -ENOMEM;
   ast->fbdev = afbdev;
   spin_lock_init(&afbdev->dirty_lock);
   drm_fb_helper_prepare(dev, &afbdev->helper, &ast_fb_helper_funcs);
-  ret = drm_fb_helper_init(dev, &afbdev->helper, 1, 1);
+  ret = drm_fb_helper_init(dev, &afbdev->helper, 1);
   if (ret) goto free;
   ret = drm_fb_helper_single_add_all_connectors(&afbdev->helper);
   if (ret) goto fini;
   /* disable all the possible outputs/crtcs before entering KMS mode */
   drm_helper_disable_unused_functions(dev);
   ret = drm_fb_helper_initial_config(&afbdev->helper, 32);
   if (ret) goto fini;
   return 0;
 fini:
   drm_fb_helper_fini(&afbdev->helper);
 free:
   kfree(afbdev);
   return ret;
 }<sep>@@
expression A,B,C,D,E;
@@
(
- drm_fb_helper_init(A,B,C,D)
+ drm_fb_helper_init(A,B,D)
|
- drm_fbdev_cma_init_with_funcs(A,B,C,D,E)
+ drm_fbdev_cma_init_with_funcs(A,B,D,E)
|
- drm_fbdev_cma_init(A,B,C,D)
+ drm_fbdev_cma_init(A,B,D)
)
--- initial
+++ final
@@ -1,58 +1,58 @@
 static int atmel_hlcdc_dc_load(struct drm_device *dev) {
   struct platform_device *pdev = to_platform_device(dev->dev);
   const struct of_device_id *match;
   struct atmel_hlcdc_dc *dc;
   int ret;
   match = of_match_node(atmel_hlcdc_of_match, dev->dev->parent->of_node);
   if (!match) {
     dev_err(&pdev->dev, "invalid compatible string\n");
     return -ENODEV;
   }
   if (!match->data) {
     dev_err(&pdev->dev, "invalid hlcdc description\n");
     return -EINVAL;
   }
   dc = devm_kzalloc(dev->dev, sizeof(*dc), GFP_KERNEL);
   if (!dc) return -ENOMEM;
   dc->wq = alloc_ordered_workqueue("atmel-hlcdc-dc", 0);
   if (!dc->wq) return -ENOMEM;
   init_waitqueue_head(&dc->commit.wait);
   dc->desc = match->data;
   dc->hlcdc = dev_get_drvdata(dev->dev->parent);
   dev->dev_private = dc;
   ret = clk_prepare_enable(dc->hlcdc->periph_clk);
   if (ret) {
     dev_err(dev->dev, "failed to enable periph_clk\n");
     goto err_destroy_wq;
   }
   pm_runtime_enable(dev->dev);
   ret = drm_vblank_init(dev, 1);
   if (ret < 0) {
     dev_err(dev->dev, "failed to initialize vblank\n");
     goto err_periph_clk_disable;
   }
   ret = atmel_hlcdc_dc_modeset_init(dev);
   if (ret < 0) {
     dev_err(dev->dev, "failed to initialize mode setting\n");
     goto err_periph_clk_disable;
   }
   drm_mode_config_reset(dev);
   pm_runtime_get_sync(dev->dev);
   ret = drm_irq_install(dev, dc->hlcdc->irq);
   pm_runtime_put_sync(dev->dev);
   if (ret < 0) {
     dev_err(dev->dev, "failed to install IRQ handler\n");
     goto err_periph_clk_disable;
   }
   platform_set_drvdata(pdev, dev);
-  dc->fbdev = drm_fbdev_cma_init(dev, 24, dev->mode_config.num_crtc, dev->mode_config.num_connector);
+  dc->fbdev = drm_fbdev_cma_init(dev, 24, dev->mode_config.num_connector);
   if (IS_ERR(dc->fbdev)) dc->fbdev = NULL;
   drm_kms_helper_poll_init(dev);
   return 0;
 err_periph_clk_disable:
   pm_runtime_disable(dev->dev);
   clk_disable_unprepare(dc->hlcdc->periph_clk);
 err_destroy_wq:
   destroy_workqueue(dc->wq);
   return ret;
 }<sep>@@
expression A,B,C,D,E;
@@
(
- drm_fb_helper_init(A,B,C,D)
+ drm_fb_helper_init(A,B,D)
|
- drm_fbdev_cma_init_with_funcs(A,B,C,D,E)
+ drm_fbdev_cma_init_with_funcs(A,B,D,E)
|
- drm_fbdev_cma_init(A,B,C,D)
+ drm_fbdev_cma_init(A,B,D)
)
--- initial
+++ final
@@ -1,16 +1,16 @@
 int bochs_fbdev_init(struct bochs_device *bochs) {
   int ret;
   drm_fb_helper_prepare(bochs->dev, &bochs->fb.helper, &bochs_fb_helper_funcs);
-  ret = drm_fb_helper_init(bochs->dev, &bochs->fb.helper, 1, 1);
+  ret = drm_fb_helper_init(bochs->dev, &bochs->fb.helper, 1);
   if (ret) return ret;
   ret = drm_fb_helper_single_add_all_connectors(&bochs->fb.helper);
   if (ret) goto fini;
   drm_helper_disable_unused_functions(bochs->dev);
   ret = drm_fb_helper_initial_config(&bochs->fb.helper, 32);
   if (ret) goto fini;
   bochs->fb.initialized = true;
   return 0;
 fini:
   drm_fb_helper_fini(&bochs->fb.helper);
   return ret;
 }<sep>@@
expression A,B,C,D,E;
@@
(
- drm_fb_helper_init(A,B,C,D)
+ drm_fb_helper_init(A,B,D)
|
- drm_fbdev_cma_init_with_funcs(A,B,C,D,E)
+ drm_fbdev_cma_init_with_funcs(A,B,D,E)
|
- drm_fbdev_cma_init(A,B,C,D)
+ drm_fbdev_cma_init(A,B,D)
)
--- initial
+++ final
@@ -1,18 +1,18 @@
 int cirrus_fbdev_init(struct cirrus_device *cdev) {
   struct cirrus_fbdev *gfbdev;
   int ret;
   int bpp_sel = 24;
   /*bpp_sel = 8;*/
   gfbdev = kzalloc(sizeof(struct cirrus_fbdev), GFP_KERNEL);
   if (!gfbdev) return -ENOMEM;
   cdev->mode_info.gfbdev = gfbdev;
   spin_lock_init(&gfbdev->dirty_lock);
   drm_fb_helper_prepare(cdev->dev, &gfbdev->helper, &cirrus_fb_helper_funcs);
-  ret = drm_fb_helper_init(cdev->dev, &gfbdev->helper, cdev->num_crtc, CIRRUSFB_CONN_LIMIT);
+  ret = drm_fb_helper_init(cdev->dev, &gfbdev->helper, CIRRUSFB_CONN_LIMIT);
   if (ret) return ret;
   ret = drm_fb_helper_single_add_all_connectors(&gfbdev->helper);
   if (ret) return ret;
   /* disable all the possible outputs/crtcs before entering KMS mode */
   drm_helper_disable_unused_functions(cdev->dev);
   return drm_fb_helper_initial_config(&gfbdev->helper, bpp_sel);
 }<sep>@@
expression A,B,C,D,E;
@@
(
- drm_fb_helper_init(A,B,C,D)
+ drm_fb_helper_init(A,B,D)
|
- drm_fbdev_cma_init_with_funcs(A,B,C,D,E)
+ drm_fbdev_cma_init_with_funcs(A,B,D,E)
|
- drm_fbdev_cma_init(A,B,C,D)
+ drm_fbdev_cma_init(A,B,D)
)
--- initial
+++ final
@@ -1,3 +1,3 @@
 struct drm_fbdev_cma *drm_fbdev_cma_init(struct drm_device *dev, unsigned int preferred_bpp, unsigned int num_crtc, unsigned int max_conn_count) {
-  return drm_fbdev_cma_init_with_funcs(dev, preferred_bpp, num_crtc, max_conn_count, &drm_fb_cma_funcs);
+  return drm_fbdev_cma_init_with_funcs(dev, preferred_bpp, max_conn_count, &drm_fb_cma_funcs);
 }<sep>@r@
expression A,B,D,E;
identifier C;
@@
(
- drm_fb_helper_init(A,B,C,D)
+ drm_fb_helper_init(A,B,D)
|
- drm_fbdev_cma_init_with_funcs(A,B,C,D,E)
+ drm_fbdev_cma_init_with_funcs(A,B,D,E)
|
- drm_fbdev_cma_init(A,B,C,D)
+ drm_fbdev_cma_init(A,B,D)
)
--- initial
+++ final
@@ -1,34 +1,34 @@
 struct drm_fbdev_cma *drm_fbdev_cma_init_with_funcs(struct drm_device *dev, unsigned int preferred_bpp, unsigned int num_crtc, unsigned int max_conn_count, const struct drm_framebuffer_funcs *funcs) {
   struct drm_fbdev_cma *fbdev_cma;
   struct drm_fb_helper *helper;
   int ret;
   fbdev_cma = kzalloc(sizeof(*fbdev_cma), GFP_KERNEL);
   if (!fbdev_cma) {
     dev_err(dev->dev, "Failed to allocate drm fbdev.\n");
     return ERR_PTR(-ENOMEM);
   }
   fbdev_cma->fb_funcs = funcs;
   helper = &fbdev_cma->fb_helper;
   drm_fb_helper_prepare(dev, helper, &drm_fb_cma_helper_funcs);
-  ret = drm_fb_helper_init(dev, helper, num_crtc, max_conn_count);
+  ret = drm_fb_helper_init(dev, helper, max_conn_count);
   if (ret < 0) {
     dev_err(dev->dev, "Failed to initialize drm fb helper.\n");
     goto err_free;
   }
   ret = drm_fb_helper_single_add_all_connectors(helper);
   if (ret < 0) {
     dev_err(dev->dev, "Failed to add connectors.\n");
     goto err_drm_fb_helper_fini;
   }
   ret = drm_fb_helper_initial_config(helper, preferred_bpp);
   if (ret < 0) {
     dev_err(dev->dev, "Failed to set initial hw configuration.\n");
     goto err_drm_fb_helper_fini;
   }
   return fbdev_cma;
 err_drm_fb_helper_fini:
   drm_fb_helper_fini(helper);
 err_free:
   kfree(fbdev_cma);
   return ERR_PTR(ret);
 }<sep>@r@
expression A,B,D,E;
identifier C;
@@
(
- drm_fb_helper_init(A,B,C,D)
+ drm_fb_helper_init(A,B,D)
|
- drm_fbdev_cma_init_with_funcs(A,B,C,D,E)
+ drm_fbdev_cma_init_with_funcs(A,B,D,E)
|
- drm_fbdev_cma_init(A,B,C,D)
+ drm_fbdev_cma_init(A,B,D)
)
--- initial
+++ final
@@ -1,38 +1,36 @@
 int exynos_drm_fbdev_init(struct drm_device *dev) {
   struct exynos_drm_fbdev *fbdev;
   struct exynos_drm_private *private = dev->dev_private;
   struct drm_fb_helper *helper;
-  unsigned int num_crtc;
   int ret;
   if (!dev->mode_config.num_crtc || !dev->mode_config.num_connector) return 0;
   if (!exynos_drm_fbdev_is_anything_connected(dev)) return 0;
   fbdev = kzalloc(sizeof(*fbdev), GFP_KERNEL);
   if (!fbdev) return -ENOMEM;
 private
   ->fb_helper = helper = &fbdev->drm_fb_helper;
   drm_fb_helper_prepare(dev, helper, &exynos_drm_fb_helper_funcs);
-  num_crtc = dev->mode_config.num_crtc;
-  ret = drm_fb_helper_init(dev, helper, num_crtc, MAX_CONNECTOR);
+  ret = drm_fb_helper_init(dev, helper, MAX_CONNECTOR);
   if (ret < 0) {
     DRM_ERROR("failed to initialize drm fb helper.\n");
     goto err_init;
   }
   ret = drm_fb_helper_single_add_all_connectors(helper);
   if (ret < 0) {
     DRM_ERROR("failed to register drm_fb_helper_connector.\n");
     goto err_setup;
   }
   ret = drm_fb_helper_initial_config(helper, PREFERRED_BPP);
   if (ret < 0) {
     DRM_ERROR("failed to set up hw configuration.\n");
     goto err_setup;
   }
   return 0;
 err_setup:
   drm_fb_helper_fini(helper);
 err_init:
 private
   ->fb_helper = NULL;
   kfree(fbdev);
   return ret;
 }<sep>@r@
expression A,B,D,E;
identifier C;
@@
(
- drm_fb_helper_init(A,B,C,D)
+ drm_fb_helper_init(A,B,D)
|
- drm_fbdev_cma_init_with_funcs(A,B,C,D,E)
+ drm_fbdev_cma_init_with_funcs(A,B,D,E)
|
- drm_fbdev_cma_init(A,B,C,D)
+ drm_fbdev_cma_init(A,B,D)
)

@@
identifier r.C;
type T;
expression V;
@@
- T C;
<...
when != C
- C = V;
...>
--- initial
+++ final
@@ -1,23 +1,23 @@
 static int tegra_fbdev_init(struct tegra_fbdev *fbdev, unsigned int preferred_bpp, unsigned int num_crtc, unsigned int max_connectors) {
   struct drm_device *drm = fbdev->base.dev;
   int err;
-  err = drm_fb_helper_init(drm, &fbdev->base, num_crtc, max_connectors);
+  err = drm_fb_helper_init(drm, &fbdev->base, max_connectors);
   if (err < 0) {
     dev_err(drm->dev, "failed to initialize DRM FB helper: %d\n", err);
     return err;
   }
   err = drm_fb_helper_single_add_all_connectors(&fbdev->base);
   if (err < 0) {
     dev_err(drm->dev, "failed to add connectors: %d\n", err);
     goto fini;
   }
   err = drm_fb_helper_initial_config(&fbdev->base, preferred_bpp);
   if (err < 0) {
     dev_err(drm->dev, "failed to set initial configuration: %d\n", err);
     goto fini;
   }
   return 0;
 fini:
   drm_fb_helper_fini(&fbdev->base);
   return err;
 }<sep>@r@
expression A,B,D,E;
identifier C;
@@
(
- drm_fb_helper_init(A,B,C,D)
+ drm_fb_helper_init(A,B,D)
|
- drm_fbdev_cma_init_with_funcs(A,B,C,D,E)
+ drm_fbdev_cma_init_with_funcs(A,B,D,E)
|
- drm_fbdev_cma_init(A,B,C,D)
+ drm_fbdev_cma_init(A,B,D)
)
--- initial
+++ final
@@ -1,26 +1,26 @@
 int psb_fbdev_init(struct drm_device *dev) {
   struct psb_fbdev *fbdev;
   struct drm_psb_private *dev_priv = dev->dev_private;
   int ret;
   fbdev = kzalloc(sizeof(struct psb_fbdev), GFP_KERNEL);
   if (!fbdev) {
     dev_err(dev->dev, "no memory\n");
     return -ENOMEM;
   }
   dev_priv->fbdev = fbdev;
   drm_fb_helper_prepare(dev, &fbdev->psb_fb_helper, &psb_fb_helper_funcs);
-  ret = drm_fb_helper_init(dev, &fbdev->psb_fb_helper, dev_priv->ops->crtcs, INTELFB_CONN_LIMIT);
+  ret = drm_fb_helper_init(dev, &fbdev->psb_fb_helper, INTELFB_CONN_LIMIT);
   if (ret) goto free;
   ret = drm_fb_helper_single_add_all_connectors(&fbdev->psb_fb_helper);
   if (ret) goto fini;
   /* disable all the possible outputs/crtcs before entering KMS mode */
   drm_helper_disable_unused_functions(dev);
   ret = drm_fb_helper_initial_config(&fbdev->psb_fb_helper, 32);
   if (ret) goto fini;
   return 0;
 fini:
   drm_fb_helper_fini(&fbdev->psb_fb_helper);
 free:
   kfree(fbdev);
   return ret;
 }<sep>@@
expression A,B,C,D,E;
@@
(
- drm_fb_helper_init(A,B,C,D)
+ drm_fb_helper_init(A,B,D)
|
- drm_fbdev_cma_init_with_funcs(A,B,C,D,E)
+ drm_fbdev_cma_init_with_funcs(A,B,D,E)
|
- drm_fbdev_cma_init(A,B,C,D)
+ drm_fbdev_cma_init(A,B,D)
)
--- initial
+++ final
@@ -1,36 +1,36 @@
 static int fsl_dcu_load(struct drm_device *dev, unsigned long flags) {
   struct fsl_dcu_drm_device *fsl_dev = dev->dev_private;
   int ret;
   ret = fsl_dcu_drm_modeset_init(fsl_dev);
   if (ret < 0) {
     dev_err(dev->dev, "failed to initialize mode setting\n");
     return ret;
   }
   ret = drm_vblank_init(dev, dev->mode_config.num_crtc);
   if (ret < 0) {
     dev_err(dev->dev, "failed to initialize vblank\n");
     goto done;
   }
   ret = fsl_dcu_drm_irq_init(dev);
   if (ret < 0) goto done;
   dev->irq_enabled = true;
   if (legacyfb_depth != 16 && legacyfb_depth != 24 && legacyfb_depth != 32) {
     dev_warn(dev->dev, "Invalid legacyfb_depth.  Defaulting to 24bpp\n");
     legacyfb_depth = 24;
   }
-  fsl_dev->fbdev = drm_fbdev_cma_init(dev, legacyfb_depth, 1, 1);
+  fsl_dev->fbdev = drm_fbdev_cma_init(dev, legacyfb_depth, 1);
   if (IS_ERR(fsl_dev->fbdev)) {
     ret = PTR_ERR(fsl_dev->fbdev);
     fsl_dev->fbdev = NULL;
     goto done;
   }
   return 0;
 done:
   drm_kms_helper_poll_fini(dev);
   if (fsl_dev->fbdev) drm_fbdev_cma_fini(fsl_dev->fbdev);
   drm_mode_config_cleanup(dev);
   drm_vblank_cleanup(dev);
   drm_irq_uninstall(dev);
   dev->dev_private = NULL;
   return ret;
 }<sep>@@
expression A,B,C,D,E;
@@
(
- drm_fb_helper_init(A,B,C,D)
+ drm_fb_helper_init(A,B,D)
|
- drm_fbdev_cma_init_with_funcs(A,B,C,D,E)
+ drm_fbdev_cma_init_with_funcs(A,B,D,E)
|
- drm_fbdev_cma_init(A,B,C,D)
+ drm_fbdev_cma_init(A,B,D)
)
--- initial
+++ final
@@ -1,58 +1,58 @@
 static int hdlcd_drm_bind(struct device *dev) {
   struct drm_device *drm;
   struct hdlcd_drm_private *hdlcd;
   int ret;
   hdlcd = devm_kzalloc(dev, sizeof(*hdlcd), GFP_KERNEL);
   if (!hdlcd) return -ENOMEM;
   drm = drm_dev_alloc(&hdlcd_driver, dev);
   if (IS_ERR(drm)) return PTR_ERR(drm);
   drm->dev_private = hdlcd;
   dev_set_drvdata(dev, drm);
   hdlcd_setup_mode_config(drm);
   ret = hdlcd_load(drm, 0);
   if (ret) goto err_free;
   ret = component_bind_all(dev, drm);
   if (ret) {
     DRM_ERROR("Failed to bind all components\n");
     goto err_unload;
   }
   ret = pm_runtime_set_active(dev);
   if (ret) goto err_pm_active;
   pm_runtime_enable(dev);
   ret = drm_vblank_init(drm, drm->mode_config.num_crtc);
   if (ret < 0) {
     DRM_ERROR("failed to initialise vblank\n");
     goto err_vblank;
   }
   drm_mode_config_reset(drm);
   drm_kms_helper_poll_init(drm);
-  hdlcd->fbdev = drm_fbdev_cma_init(drm, 32, drm->mode_config.num_crtc, drm->mode_config.num_connector);
+  hdlcd->fbdev = drm_fbdev_cma_init(drm, 32, drm->mode_config.num_connector);
   if (IS_ERR(hdlcd->fbdev)) {
     ret = PTR_ERR(hdlcd->fbdev);
     hdlcd->fbdev = NULL;
     goto err_fbdev;
   }
   ret = drm_dev_register(drm, 0);
   if (ret) goto err_register;
   return 0;
 err_register:
   if (hdlcd->fbdev) {
     drm_fbdev_cma_fini(hdlcd->fbdev);
     hdlcd->fbdev = NULL;
   }
 err_fbdev:
   drm_kms_helper_poll_fini(drm);
   drm_vblank_cleanup(drm);
 err_vblank:
   pm_runtime_disable(drm->dev);
 err_pm_active:
   component_unbind_all(dev, drm);
 err_unload:
   drm_irq_uninstall(drm);
   of_reserved_mem_device_release(drm->dev);
 err_free:
   drm_mode_config_cleanup(drm);
   dev_set_drvdata(dev, NULL);
   drm_dev_unref(drm);
   return ret;
 }<sep>@@
expression A,B,C,D,E;
@@
(
- drm_fb_helper_init(A,B,C,D)
+ drm_fb_helper_init(A,B,D)
|
- drm_fbdev_cma_init_with_funcs(A,B,C,D,E)
+ drm_fbdev_cma_init_with_funcs(A,B,D,E)
|
- drm_fbdev_cma_init(A,B,C,D)
+ drm_fbdev_cma_init(A,B,D)
)
--- initial
+++ final
@@ -1,59 +1,59 @@
 int hibmc_fbdev_init(struct hibmc_drm_private *priv) {
   int ret;
   struct fb_var_screeninfo *var;
   struct fb_fix_screeninfo *fix;
   struct hibmc_fbdev *hifbdev;
   hifbdev = devm_kzalloc(priv->dev->dev, sizeof(*hifbdev), GFP_KERNEL);
   if (!hifbdev) {
     DRM_ERROR("failed to allocate hibmc_fbdev\n");
     return -ENOMEM;
   }
   priv->fbdev = hifbdev;
   drm_fb_helper_prepare(priv->dev, &hifbdev->helper, &hibmc_fbdev_helper_funcs);
   /* Now just one crtc and one channel */
-  ret = drm_fb_helper_init(priv->dev, &hifbdev->helper, 1, 1);
+  ret = drm_fb_helper_init(priv->dev, &hifbdev->helper, 1);
   if (ret) {
     DRM_ERROR("failed to initialize fb helper: %d\n", ret);
     return ret;
   }
   ret = drm_fb_helper_single_add_all_connectors(&hifbdev->helper);
   if (ret) {
     DRM_ERROR("failed to add all connectors: %d\n", ret);
     goto fini;
   }
   ret = drm_fb_helper_initial_config(&hifbdev->helper, 16);
   if (ret) {
     DRM_ERROR("failed to setup initial conn config: %d\n", ret);
     goto fini;
   }
   var = &hifbdev->helper.fbdev->var;
   fix = &hifbdev->helper.fbdev->fix;
   DRM_DEBUG_DRIVER("Member of info->var is :\n"
                    "xres=%d\n"
                    "yres=%d\n"
                    "xres_virtual=%d\n"
                    "yres_virtual=%d\n"
                    "xoffset=%d\n"
                    "yoffset=%d\n"
                    "bits_per_pixel=%d\n"
                    "...\n",
                    var->xres, var->yres, var->xres_virtual, var->yres_virtual, var->xoffset, var->yoffset, var->bits_per_pixel);
   DRM_DEBUG_DRIVER("Member of info->fix is :\n"
                    "smem_start=%lx\n"
                    "smem_len=%d\n"
                    "type=%d\n"
                    "type_aux=%d\n"
                    "visual=%d\n"
                    "xpanstep=%d\n"
                    "ypanstep=%d\n"
                    "ywrapstep=%d\n"
                    "line_length=%d\n"
                    "accel=%d\n"
                    "capabilities=%d\n"
                    "...\n",
                    fix->smem_start, fix->smem_len, fix->type, fix->type_aux, fix->visual, fix->xpanstep, fix->ypanstep, fix->ywrapstep, fix->line_length, fix->accel, fix->capabilities);
   return 0;
 fini:
   drm_fb_helper_fini(&hifbdev->helper);
   return ret;
 }<sep>@@
expression A,B,C,D,E;
@@
(
- drm_fb_helper_init(A,B,C,D)
+ drm_fb_helper_init(A,B,D)
|
- drm_fbdev_cma_init_with_funcs(A,B,C,D,E)
+ drm_fbdev_cma_init_with_funcs(A,B,D,E)
|
- drm_fbdev_cma_init(A,B,C,D)
+ drm_fbdev_cma_init(A,B,D)
)