From: Felipe Balbi
> Sent: 08 March 2016 13:48
...
> wonder if we should provide a generic static inline for that. Seems like
> that will replicate on many drivers. How about:
>
> static inline int dma_try_mask_and_coherent(struct device *dev)
> {
> int ret;
>
> ret = dma_set_mask_and_coherent(dev, DMA_BIT_MASK(64));
> if (ret) {
> ret = dma_set_mask_and_coherent(dev, DMA_BIT_MASK(32));
> if (ret) {
> dev_err(dev, "failed to set dma mask\n");
> return ret;
> }
> }
>
> return 0;
> }
Probably worthy of a real function.
Maybe dma_set_mask_and_coherent_64_32(dev) ?
David
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html