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

Commit de71f988 authored by Russell King's avatar Russell King
Browse files

DMA-API: net: b43legacy: 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 e1390a2a
Loading
Loading
Loading
Loading
+3 −6
Original line number Original line Diff line number Diff line
@@ -806,12 +806,9 @@ static int b43legacy_dma_set_mask(struct b43legacy_wldev *dev, u64 mask)
	/* Try to set the DMA mask. If it fails, try falling back to a
	/* Try to set the DMA mask. If it fails, try falling back to a
	 * lower mask, as we can always also support a lower one. */
	 * lower mask, as we can always also support a lower one. */
	while (1) {
	while (1) {
		err = dma_set_mask(dev->dev->dma_dev, mask);
		err = dma_set_mask_and_coherent(dev->dev->dma_dev, mask);
		if (!err) {
			err = dma_set_coherent_mask(dev->dev->dma_dev, mask);
		if (!err)
		if (!err)
			break;
			break;
		}
		if (mask == DMA_BIT_MASK(64)) {
		if (mask == DMA_BIT_MASK(64)) {
			mask = DMA_BIT_MASK(32);
			mask = DMA_BIT_MASK(32);
			fallback = true;
			fallback = true;