Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 4c15c243 authored by Russell King's avatar Russell King
Browse files

DMA-API: net: emulex/benet: replace dma_set_mask()+dma_set_coherent_mask() with new helper



Replace the following sequence:

	dma_set_mask(dev, mask);
	dma_set_coherent_mask(dev, mask);

with a call to the new helper dma_set_mask_and_coherent().

Signed-off-by: default avatarRussell King <rmk+kernel@arm.linux.org.uk>
parent 1bfa2c40
Loading
Loading
Loading
Loading
+2 −10
Original line number Diff line number Diff line
@@ -4335,19 +4335,11 @@ static int be_probe(struct pci_dev *pdev, const struct pci_device_id *pdev_id)
	adapter->netdev = netdev;
	SET_NETDEV_DEV(netdev, &pdev->dev);

	status = dma_set_mask(&pdev->dev, DMA_BIT_MASK(64));
	status = dma_set_mask_and_coherent(&pdev->dev, DMA_BIT_MASK(64));
	if (!status) {
		status = dma_set_coherent_mask(&pdev->dev, DMA_BIT_MASK(64));
		if (status < 0) {
			dev_err(&pdev->dev, "dma_set_coherent_mask failed\n");
			goto free_netdev;
		}
		netdev->features |= NETIF_F_HIGHDMA;
	} else {
		status = dma_set_mask(&pdev->dev, DMA_BIT_MASK(32));
		if (!status)
			status = dma_set_coherent_mask(&pdev->dev,
						       DMA_BIT_MASK(32));
		status = dma_set_mask_and_coherent(&pdev->dev, DMA_BIT_MASK(32));
		if (status) {
			dev_err(&pdev->dev, "Could not set PCI DMA Mask\n");
			goto free_netdev;