Commit 72c89ce9 authored by Bjoern A. Zeeb's avatar Bjoern A. Zeeb
Browse files

LinuxKPI: dma-mapping.h unify "mask" and "dma_mask"

In some places we are using "mask" and others "dma_mask" for the
same thing.  Harmonize the various places to "dma_mask" as used in
linux_pci.c.  For the declaration remove the argument names to
avoid the entire problem.

This is in preparation for an upcoming change.
No functional changes intended.

Sponsored by:	The FreeBSD Foundation
MFC after:	5 days
parent e3cf7ebc
......@@ -91,7 +91,7 @@ struct dma_map_ops {
#define DMA_BIT_MASK(n) ((2ULL << ((n) - 1)) - 1ULL)
int linux_dma_tag_init(struct device *dev, u64 mask);
int linux_dma_tag_init(struct device *, u64);
void *linux_dma_alloc_coherent(struct device *dev, size_t size,
dma_addr_t *dma_handle, gfp_t flag);
dma_addr_t linux_dma_map_phys(struct device *dev, vm_paddr_t phys, size_t len);
......@@ -104,7 +104,7 @@ void linux_dma_unmap_sg_attrs(struct device *dev, struct scatterlist *sg,
unsigned long attrs __unused);
static inline int
dma_supported(struct device *dev, u64 mask)
dma_supported(struct device *dev, u64 dma_mask)
{
/* XXX busdma takes care of this elsewhere. */
......@@ -122,23 +122,23 @@ dma_set_mask(struct device *dev, u64 dma_mask)
}
static inline int
dma_set_coherent_mask(struct device *dev, u64 mask)
dma_set_coherent_mask(struct device *dev, u64 dma_mask)
{
if (!dma_supported(dev, mask))
if (!dma_supported(dev, dma_mask))
return -EIO;
/* XXX Currently we don't support a separate coherent mask. */
return 0;
}
static inline int
dma_set_mask_and_coherent(struct device *dev, u64 mask)
dma_set_mask_and_coherent(struct device *dev, u64 dma_mask)
{
int r;
r = dma_set_mask(dev, mask);
r = dma_set_mask(dev, dma_mask);
if (r == 0)
dma_set_coherent_mask(dev, mask);
dma_set_coherent_mask(dev, dma_mask);
return (r);
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment