dma-mapping: replace all DMA_32BIT_MASK macro with DMA_BIT_MASK(32)
Replace all DMA_32BIT_MASK macro with DMA_BIT_MASK(32) Signed-off-by: Yang Hongyang<yanghy@cn.fujitsu.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
This commit is contained in:

committed by
Linus Torvalds

parent
6afd142fd0
commit
284901a90a
@@ -1804,8 +1804,8 @@ static int __devinit adm8211_probe(struct pci_dev *pdev,
|
||||
return err; /* someone else grabbed it? don't disable it */
|
||||
}
|
||||
|
||||
if (pci_set_dma_mask(pdev, DMA_32BIT_MASK) ||
|
||||
pci_set_consistent_dma_mask(pdev, DMA_32BIT_MASK)) {
|
||||
if (pci_set_dma_mask(pdev, DMA_BIT_MASK(32)) ||
|
||||
pci_set_consistent_dma_mask(pdev, DMA_BIT_MASK(32))) {
|
||||
printk(KERN_ERR "%s (adm8211): No suitable DMA available\n",
|
||||
pci_name(pdev));
|
||||
goto err_free_reg;
|
||||
|
@@ -445,7 +445,7 @@ ath5k_pci_probe(struct pci_dev *pdev,
|
||||
}
|
||||
|
||||
/* XXX 32-bit addressing only */
|
||||
ret = pci_set_dma_mask(pdev, DMA_32BIT_MASK);
|
||||
ret = pci_set_dma_mask(pdev, DMA_BIT_MASK(32));
|
||||
if (ret) {
|
||||
dev_err(&pdev->dev, "32-bit DMA not available\n");
|
||||
goto err_dis;
|
||||
|
@@ -777,7 +777,7 @@ static u64 supported_dma_mask(struct b43_wldev *dev)
|
||||
b43_write32(dev, mmio_base + B43_DMA32_TXCTL, B43_DMA32_TXADDREXT_MASK);
|
||||
tmp = b43_read32(dev, mmio_base + B43_DMA32_TXCTL);
|
||||
if (tmp & B43_DMA32_TXADDREXT_MASK)
|
||||
return DMA_32BIT_MASK;
|
||||
return DMA_BIT_MASK(32);
|
||||
|
||||
return DMA_30BIT_MASK;
|
||||
}
|
||||
@@ -786,7 +786,7 @@ static enum b43_dmatype dma_mask_to_engine_type(u64 dmamask)
|
||||
{
|
||||
if (dmamask == DMA_30BIT_MASK)
|
||||
return B43_DMA_30BIT;
|
||||
if (dmamask == DMA_32BIT_MASK)
|
||||
if (dmamask == DMA_BIT_MASK(32))
|
||||
return B43_DMA_32BIT;
|
||||
if (dmamask == DMA_BIT_MASK(64))
|
||||
return B43_DMA_64BIT;
|
||||
@@ -1000,11 +1000,11 @@ static int b43_dma_set_mask(struct b43_wldev *dev, u64 mask)
|
||||
if (!err)
|
||||
break;
|
||||
if (mask == DMA_BIT_MASK(64)) {
|
||||
mask = DMA_32BIT_MASK;
|
||||
mask = DMA_BIT_MASK(32);
|
||||
fallback = 1;
|
||||
continue;
|
||||
}
|
||||
if (mask == DMA_32BIT_MASK) {
|
||||
if (mask == DMA_BIT_MASK(32)) {
|
||||
mask = DMA_30BIT_MASK;
|
||||
fallback = 1;
|
||||
continue;
|
||||
|
@@ -854,7 +854,7 @@ static u64 supported_dma_mask(struct b43legacy_wldev *dev)
|
||||
tmp = b43legacy_read32(dev, mmio_base +
|
||||
B43legacy_DMA32_TXCTL);
|
||||
if (tmp & B43legacy_DMA32_TXADDREXT_MASK)
|
||||
return DMA_32BIT_MASK;
|
||||
return DMA_BIT_MASK(32);
|
||||
|
||||
return DMA_30BIT_MASK;
|
||||
}
|
||||
@@ -863,7 +863,7 @@ static enum b43legacy_dmatype dma_mask_to_engine_type(u64 dmamask)
|
||||
{
|
||||
if (dmamask == DMA_30BIT_MASK)
|
||||
return B43legacy_DMA_30BIT;
|
||||
if (dmamask == DMA_32BIT_MASK)
|
||||
if (dmamask == DMA_BIT_MASK(32))
|
||||
return B43legacy_DMA_32BIT;
|
||||
if (dmamask == DMA_BIT_MASK(64))
|
||||
return B43legacy_DMA_64BIT;
|
||||
@@ -1043,11 +1043,11 @@ static int b43legacy_dma_set_mask(struct b43legacy_wldev *dev, u64 mask)
|
||||
if (!err)
|
||||
break;
|
||||
if (mask == DMA_BIT_MASK(64)) {
|
||||
mask = DMA_32BIT_MASK;
|
||||
mask = DMA_BIT_MASK(32);
|
||||
fallback = 1;
|
||||
continue;
|
||||
}
|
||||
if (mask == DMA_32BIT_MASK) {
|
||||
if (mask == DMA_BIT_MASK(32)) {
|
||||
mask = DMA_30BIT_MASK;
|
||||
fallback = 1;
|
||||
continue;
|
||||
|
@@ -6207,7 +6207,7 @@ static int ipw2100_pci_init_one(struct pci_dev *pci_dev,
|
||||
pci_set_master(pci_dev);
|
||||
pci_set_drvdata(pci_dev, priv);
|
||||
|
||||
err = pci_set_dma_mask(pci_dev, DMA_32BIT_MASK);
|
||||
err = pci_set_dma_mask(pci_dev, DMA_BIT_MASK(32));
|
||||
if (err) {
|
||||
printk(KERN_WARNING DRV_NAME
|
||||
"Error calling pci_set_dma_mask.\n");
|
||||
|
@@ -11631,9 +11631,9 @@ static int __devinit ipw_pci_probe(struct pci_dev *pdev,
|
||||
|
||||
pci_set_master(pdev);
|
||||
|
||||
err = pci_set_dma_mask(pdev, DMA_32BIT_MASK);
|
||||
err = pci_set_dma_mask(pdev, DMA_BIT_MASK(32));
|
||||
if (!err)
|
||||
err = pci_set_consistent_dma_mask(pdev, DMA_32BIT_MASK);
|
||||
err = pci_set_consistent_dma_mask(pdev, DMA_BIT_MASK(32));
|
||||
if (err) {
|
||||
printk(KERN_WARNING DRV_NAME ": No suitable DMA available.\n");
|
||||
goto out_pci_disable_device;
|
||||
|
@@ -4998,9 +4998,9 @@ static int iwl3945_pci_probe(struct pci_dev *pdev, const struct pci_device_id *e
|
||||
|
||||
pci_set_master(pdev);
|
||||
|
||||
err = pci_set_dma_mask(pdev, DMA_32BIT_MASK);
|
||||
err = pci_set_dma_mask(pdev, DMA_BIT_MASK(32));
|
||||
if (!err)
|
||||
err = pci_set_consistent_dma_mask(pdev, DMA_32BIT_MASK);
|
||||
err = pci_set_consistent_dma_mask(pdev, DMA_BIT_MASK(32));
|
||||
if (err) {
|
||||
IWL_WARN(priv, "No suitable DMA available.\n");
|
||||
goto out_pci_disable_device;
|
||||
|
@@ -120,7 +120,7 @@ prism54_probe(struct pci_dev *pdev, const struct pci_device_id *id)
|
||||
}
|
||||
|
||||
/* enable PCI DMA */
|
||||
if (pci_set_dma_mask(pdev, DMA_32BIT_MASK)) {
|
||||
if (pci_set_dma_mask(pdev, DMA_BIT_MASK(32))) {
|
||||
printk(KERN_ERR "%s: 32-bit PCI DMA not supported", DRV_NAME);
|
||||
goto do_pci_disable_device;
|
||||
}
|
||||
|
@@ -288,7 +288,7 @@ int rt2x00pci_probe(struct pci_dev *pci_dev, const struct pci_device_id *id)
|
||||
if (pci_set_mwi(pci_dev))
|
||||
ERROR_PROBE("MWI not available.\n");
|
||||
|
||||
if (dma_set_mask(&pci_dev->dev, DMA_32BIT_MASK)) {
|
||||
if (dma_set_mask(&pci_dev->dev, DMA_BIT_MASK(32))) {
|
||||
ERROR_PROBE("PCI DMA not supported.\n");
|
||||
retval = -EIO;
|
||||
goto exit_disable_device;
|
||||
|
Reference in New Issue
Block a user