From: Chunfeng Yun Date: Fri, 13 Oct 2017 08:26:33 +0000 (+0800) Subject: usb: xhci-mtk: use dma_set_mask_and_coherent() in probe function X-Git-Tag: v4.15-rc1~140^2~129 X-Git-Url: https://git.kernel.dk/?a=commitdiff_plain;h=da087419c05c0e2124dcdd6eda29e4ee64b78c9d;p=linux-block.git usb: xhci-mtk: use dma_set_mask_and_coherent() in probe function This patch uses the simpler dma_set_mask_and_coherent() instead of doing these as separate steps Signed-off-by: Chunfeng Yun Acked-by: Mathias Nyman Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/usb/host/xhci-mtk.c b/drivers/usb/host/xhci-mtk.c index 8fb60657ed4f..c197a6d9e157 100644 --- a/drivers/usb/host/xhci-mtk.c +++ b/drivers/usb/host/xhci-mtk.c @@ -606,15 +606,10 @@ static int xhci_mtk_probe(struct platform_device *pdev) } /* Initialize dma_mask and coherent_dma_mask to 32-bits */ - ret = dma_set_coherent_mask(dev, DMA_BIT_MASK(32)); + ret = dma_set_mask_and_coherent(dev, DMA_BIT_MASK(32)); if (ret) goto disable_clk; - if (!dev->dma_mask) - dev->dma_mask = &dev->coherent_dma_mask; - else - dma_set_mask(dev, DMA_BIT_MASK(32)); - hcd = usb_create_hcd(driver, dev, dev_name(dev)); if (!hcd) { ret = -ENOMEM;