--- initial
+++ final
@@ -1,115 +1,114 @@
 static int usb_hcd_nxp_probe(struct platform_device *pdev) {
   struct usb_hcd *hcd = 0;
   struct ohci_hcd *ohci;
   const struct hc_driver *driver = &ohci_nxp_hc_driver;
   struct resource *res;
   int ret = 0, irq;
   struct device_node *isp1301_node;
   if (pdev->dev.of_node) {
     isp1301_node = of_parse_phandle(pdev->dev.of_node, "transceiver", 0);
   } else {
     isp1301_node = NULL;
   }
   isp1301_i2c_client = isp1301_get_client(isp1301_node);
   if (!isp1301_i2c_client) { return -EPROBE_DEFER; }
-  pdev->dev.dma_mask = &pdev->dev.coherent_dma_mask;
-  ret = dma_set_coherent_mask(&pdev->dev, DMA_BIT_MASK(32));
+  ret = dma_coerce_mask_and_coherent(&pdev->dev, DMA_BIT_MASK(32));
   if (ret) goto fail_disable;
   dev_dbg(&pdev->dev, "%s: " DRIVER_DESC " (nxp)\n", hcd_name);
   if (usb_disabled()) {
     dev_err(&pdev->dev, "USB is disabled\n");
     ret = -ENODEV;
     goto fail_disable;
   }
   /* Enable AHB slave USB clock, needed for further USB clock control */
   __raw_writel(USB_SLAVE_HCLK_EN | PAD_CONTROL_LAST_DRIVEN, USB_CTRL);
   /* Enable USB PLL */
   usb_pll_clk = clk_get(&pdev->dev, "ck_pll5");
   if (IS_ERR(usb_pll_clk)) {
     dev_err(&pdev->dev, "failed to acquire USB PLL\n");
     ret = PTR_ERR(usb_pll_clk);
     goto fail_pll;
   }
   ret = clk_enable(usb_pll_clk);
   if (ret < 0) {
     dev_err(&pdev->dev, "failed to start USB PLL\n");
     goto fail_pllen;
   }
   ret = clk_set_rate(usb_pll_clk, 48000);
   if (ret < 0) {
     dev_err(&pdev->dev, "failed to set USB clock rate\n");
     goto fail_rate;
   }
   /* Enable USB device clock */
   usb_dev_clk = clk_get(&pdev->dev, "ck_usbd");
   if (IS_ERR(usb_dev_clk)) {
     dev_err(&pdev->dev, "failed to acquire USB DEV Clock\n");
     ret = PTR_ERR(usb_dev_clk);
     goto fail_dev;
   }
   ret = clk_enable(usb_dev_clk);
   if (ret < 0) {
     dev_err(&pdev->dev, "failed to start USB DEV Clock\n");
     goto fail_deven;
   }
   /* Enable USB otg clocks */
   usb_otg_clk = clk_get(&pdev->dev, "ck_usb_otg");
   if (IS_ERR(usb_otg_clk)) {
     dev_err(&pdev->dev, "failed to acquire USB DEV Clock\n");
     ret = PTR_ERR(usb_otg_clk);
     goto fail_otg;
   }
   __raw_writel(__raw_readl(USB_CTRL) | USB_HOST_NEED_CLK_EN, USB_CTRL);
   ret = clk_enable(usb_otg_clk);
   if (ret < 0) {
     dev_err(&pdev->dev, "failed to start USB DEV Clock\n");
     goto fail_otgen;
   }
   isp1301_configure();
   hcd = usb_create_hcd(driver, &pdev->dev, dev_name(&pdev->dev));
   if (!hcd) {
     dev_err(&pdev->dev, "Failed to allocate HC buffer\n");
     ret = -ENOMEM;
     goto fail_hcd;
   }
   res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
   hcd->regs = devm_ioremap_resource(&pdev->dev, res);
   if (IS_ERR(hcd->regs)) {
     ret = PTR_ERR(hcd->regs);
     goto fail_resource;
   }
   hcd->rsrc_start = res->start;
   hcd->rsrc_len = resource_size(res);
   irq = platform_get_irq(pdev, 0);
   if (irq < 0) {
     ret = -ENXIO;
     goto fail_resource;
   }
   nxp_start_hc();
   platform_set_drvdata(pdev, hcd);
   ohci = hcd_to_ohci(hcd);
   ohci_hcd_init(ohci);
   dev_info(&pdev->dev, "at 0x%p, irq %d\n", hcd->regs, hcd->irq);
   ret = usb_add_hcd(hcd, irq, 0);
   if (ret == 0) return ret;
   nxp_stop_hc();
 fail_resource:
   usb_put_hcd(hcd);
 fail_hcd:
   clk_disable(usb_otg_clk);
 fail_otgen:
   clk_put(usb_otg_clk);
 fail_otg:
   clk_disable(usb_dev_clk);
 fail_deven:
   clk_put(usb_dev_clk);
 fail_dev:
 fail_rate:
   clk_disable(usb_pll_clk);
 fail_pllen:
   clk_put(usb_pll_clk);
 fail_pll:
 fail_disable:
   isp1301_i2c_client = NULL;
   return ret;
 }<sep>@@
expression ret,dev,v;
@@

-       dev.dma_mask = &dev.coherent_dma_mask;
-       ret = dma_set_coherent_mask(&dev, v);
+       ret = dma_coerce_mask_and_coherent(&dev, v);