/* do not use this function in a driver */ static inline bool is_device_dma_coherent(struct device *dev) { if (!dev) return false; return dev->archdata.dma_coherent; }