--- initial
+++ final
@@ -1,88 +1,87 @@
 static int exynos_ohci_probe(struct platform_device *pdev) {
   struct exynos4_ohci_platdata *pdata = dev_get_platdata(&pdev->dev);
   struct exynos_ohci_hcd *exynos_ohci;
   struct usb_hcd *hcd;
   struct ohci_hcd *ohci;
   struct resource *res;
   struct usb_phy *phy;
   int irq;
   int err;
   /*
    * Right now device-tree probed devices don't get dma_mask set.
    * Since shared usb code relies on it, set it here for now.
    * Once we move to full device tree support this will vanish off.
    */
-  if (!pdev->dev.dma_mask) pdev->dev.dma_mask = &pdev->dev.coherent_dma_mask;
-  err = dma_set_coherent_mask(&pdev->dev, DMA_BIT_MASK(32));
+  err = dma_coerce_mask_and_coherent(&pdev->dev, DMA_BIT_MASK(32));
   if (err) return err;
   exynos_ohci = devm_kzalloc(&pdev->dev, sizeof(struct exynos_ohci_hcd), GFP_KERNEL);
   if (!exynos_ohci) return -ENOMEM;
   if (of_device_is_compatible(pdev->dev.of_node, "samsung,exynos5440-ohci")) goto skip_phy;
   phy = devm_usb_get_phy(&pdev->dev, USB_PHY_TYPE_USB2);
   if (IS_ERR(phy)) {
     /* Fallback to pdata */
     if (!pdata) {
       dev_warn(&pdev->dev, "no platform data or transceiver defined\n");
       return -EPROBE_DEFER;
     } else {
       exynos_ohci->pdata = pdata;
     }
   } else {
     exynos_ohci->phy = phy;
     exynos_ohci->otg = phy->otg;
   }
 skip_phy:
   exynos_ohci->dev = &pdev->dev;
   hcd = usb_create_hcd(&exynos_ohci_hc_driver, &pdev->dev, dev_name(&pdev->dev));
   if (!hcd) {
     dev_err(&pdev->dev, "Unable to create HCD\n");
     return -ENOMEM;
   }
   exynos_ohci->hcd = hcd;
   exynos_ohci->clk = devm_clk_get(&pdev->dev, "usbhost");
   if (IS_ERR(exynos_ohci->clk)) {
     dev_err(&pdev->dev, "Failed to get usbhost clock\n");
     err = PTR_ERR(exynos_ohci->clk);
     goto fail_clk;
   }
   err = clk_prepare_enable(exynos_ohci->clk);
   if (err) goto fail_clk;
   res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
   if (!res) {
     dev_err(&pdev->dev, "Failed to get I/O memory\n");
     err = -ENXIO;
     goto fail_io;
   }
   hcd->rsrc_start = res->start;
   hcd->rsrc_len = resource_size(res);
   hcd->regs = devm_ioremap(&pdev->dev, res->start, hcd->rsrc_len);
   if (!hcd->regs) {
     dev_err(&pdev->dev, "Failed to remap I/O memory\n");
     err = -ENOMEM;
     goto fail_io;
   }
   irq = platform_get_irq(pdev, 0);
   if (!irq) {
     dev_err(&pdev->dev, "Failed to get IRQ\n");
     err = -ENODEV;
     goto fail_io;
   }
   if (exynos_ohci->otg) exynos_ohci->otg->set_host(exynos_ohci->otg, &exynos_ohci->hcd->self);
   exynos_ohci_phy_enable(exynos_ohci);
   ohci = hcd_to_ohci(hcd);
   ohci_hcd_init(ohci);
   err = usb_add_hcd(hcd, irq, IRQF_SHARED);
   if (err) {
     dev_err(&pdev->dev, "Failed to add USB HCD\n");
     goto fail_add_hcd;
   }
   platform_set_drvdata(pdev, exynos_ohci);
   return 0;
 fail_add_hcd:
   exynos_ohci_phy_disable(exynos_ohci);
 fail_io:
   clk_disable_unprepare(exynos_ohci->clk);
 fail_clk:
   usb_put_hcd(hcd);
   return err;
 }<sep>@@
expression ret,dev,v;
@@

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