--- initial
+++ final
@@ -1,143 +1,143 @@
 static int malidp_bind(struct device *dev) {
   struct resource *res;
   struct drm_device *drm;
   struct device_node *ep;
   struct malidp_drm *malidp;
   struct malidp_hw_device *hwdev;
   struct platform_device *pdev = to_platform_device(dev);
   struct of_device_id const *dev_id;
   /* number of lines for the R, G and B output */
   u8 output_width[MAX_OUTPUT_CHANNELS];
   int ret = 0, i;
   u32 version, out_depth = 0;
   malidp = devm_kzalloc(dev, sizeof(*malidp), GFP_KERNEL);
   if (!malidp) return -ENOMEM;
   hwdev = devm_kzalloc(dev, sizeof(*hwdev), GFP_KERNEL);
   if (!hwdev) return -ENOMEM;
   /*
    * copy the associated data from malidp_drm_of_match to avoid
    * having to keep a reference to the OF node after binding
    */
   memcpy(hwdev, of_device_get_match_data(dev), sizeof(*hwdev));
   malidp->dev = hwdev;
   res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
   hwdev->regs = devm_ioremap_resource(dev, res);
   if (IS_ERR(hwdev->regs)) return PTR_ERR(hwdev->regs);
   hwdev->pclk = devm_clk_get(dev, "pclk");
   if (IS_ERR(hwdev->pclk)) return PTR_ERR(hwdev->pclk);
   hwdev->aclk = devm_clk_get(dev, "aclk");
   if (IS_ERR(hwdev->aclk)) return PTR_ERR(hwdev->aclk);
   hwdev->mclk = devm_clk_get(dev, "mclk");
   if (IS_ERR(hwdev->mclk)) return PTR_ERR(hwdev->mclk);
   hwdev->pxlclk = devm_clk_get(dev, "pxlclk");
   if (IS_ERR(hwdev->pxlclk)) return PTR_ERR(hwdev->pxlclk);
   /* Get the optional framebuffer memory resource */
   ret = of_reserved_mem_device_init(dev);
   if (ret && ret != -ENODEV) return ret;
   drm = drm_dev_alloc(&malidp_driver, dev);
   if (IS_ERR(drm)) {
     ret = PTR_ERR(drm);
     goto alloc_fail;
   }
   /* Enable APB clock in order to get access to the registers */
   clk_prepare_enable(hwdev->pclk);
   /*
    * Enable AXI clock and main clock so that prefetch can start once
    * the registers are set
    */
   clk_prepare_enable(hwdev->aclk);
   clk_prepare_enable(hwdev->mclk);
   dev_id = of_match_device(malidp_drm_of_match, dev);
   if (!dev_id) {
     ret = -EINVAL;
     goto query_hw_fail;
   }
   if (!malidp_has_sufficient_address_space(res, dev_id)) {
     DRM_ERROR("Insufficient address space in device-tree.\n");
     ret = -EINVAL;
     goto query_hw_fail;
   }
   if (!malidp_is_compatible_hw_id(hwdev, dev_id)) {
     ret = -EINVAL;
     goto query_hw_fail;
   }
   ret = hwdev->query_hw(hwdev);
   if (ret) {
     DRM_ERROR("Invalid HW configuration\n");
     goto query_hw_fail;
   }
   version = malidp_hw_read(hwdev, hwdev->map.dc_base + MALIDP_DE_CORE_ID);
   DRM_INFO("found ARM Mali-DP%3x version r%dp%d\n", version >> 16, (version >> 12) & 0xf, (version >> 8) & 0xf);
   /* set the number of lines used for output of RGB data */
   ret = of_property_read_u8_array(dev->of_node, "arm,malidp-output-port-lines", output_width, MAX_OUTPUT_CHANNELS);
   if (ret) goto query_hw_fail;
   for (i = 0; i < MAX_OUTPUT_CHANNELS; i++)
     out_depth = (out_depth << 8) | (output_width[i] & 0xf);
   malidp_hw_write(hwdev, out_depth, hwdev->map.out_depth_base);
   drm->dev_private = malidp;
   dev_set_drvdata(dev, drm);
   atomic_set(&malidp->config_valid, 0);
   init_waitqueue_head(&malidp->wq);
   ret = malidp_init(drm);
   if (ret < 0) goto init_fail;
   /* Set the CRTC's port so that the encoder component can find it */
   ep = of_graph_get_next_endpoint(dev->of_node, NULL);
   if (!ep) {
     ret = -EINVAL;
     goto port_fail;
   }
   malidp->crtc.port = of_get_next_parent(ep);
   ret = component_bind_all(dev, drm);
   if (ret) {
     DRM_ERROR("Failed to bind all components\n");
     goto bind_fail;
   }
   ret = malidp_irq_init(pdev);
   if (ret < 0) goto irq_init_fail;
   drm->irq_enabled = true;
   ret = drm_vblank_init(drm, drm->mode_config.num_crtc);
   if (ret < 0) {
     DRM_ERROR("failed to initialise vblank\n");
     goto vblank_fail;
   }
   drm_mode_config_reset(drm);
-  malidp->fbdev = drm_fbdev_cma_init(drm, 32, drm->mode_config.num_crtc, drm->mode_config.num_connector);
+  malidp->fbdev = drm_fbdev_cma_init(drm, 32, drm->mode_config.num_connector);
   if (IS_ERR(malidp->fbdev)) {
     ret = PTR_ERR(malidp->fbdev);
     malidp->fbdev = NULL;
     goto fbdev_fail;
   }
   drm_kms_helper_poll_init(drm);
   ret = drm_dev_register(drm, 0);
   if (ret) goto register_fail;
   return 0;
 register_fail:
   if (malidp->fbdev) {
     drm_fbdev_cma_fini(malidp->fbdev);
     malidp->fbdev = NULL;
   }
 fbdev_fail:
   drm_vblank_cleanup(drm);
 vblank_fail:
   malidp_se_irq_fini(drm);
   malidp_de_irq_fini(drm);
   drm->irq_enabled = false;
 irq_init_fail:
   component_unbind_all(dev, drm);
 bind_fail:
   of_node_put(malidp->crtc.port);
   malidp->crtc.port = NULL;
 port_fail:
   malidp_fini(drm);
 init_fail:
   drm->dev_private = NULL;
   dev_set_drvdata(dev, NULL);
 query_hw_fail:
   clk_disable_unprepare(hwdev->mclk);
   clk_disable_unprepare(hwdev->aclk);
   clk_disable_unprepare(hwdev->pclk);
   drm_dev_unref(drm);
 alloc_fail:
   of_reserved_mem_device_release(dev);
   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)
)