dma-mapping: replace all DMA_24BIT_MASK macro with DMA_BIT_MASK(24)
authorYang Hongyang <yanghy@cn.fujitsu.com>
Tue, 7 Apr 2009 02:01:18 +0000 (19:01 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Tue, 7 Apr 2009 15:31:12 +0000 (08:31 -0700)
Replace all DMA_24BIT_MASK macro with DMA_BIT_MASK(24)

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>
arch/ia64/kernel/pci-dma.c
arch/x86/include/asm/dma-mapping.h
arch/x86/kernel/pci-dma.c
drivers/base/isa.c
drivers/pnp/card.c
drivers/pnp/core.c
sound/pci/als4000.c
sound/pci/azt3328.c
sound/pci/es1938.c
sound/pci/sonicvibes.c

index f82b0ee..eb98738 100644 (file)
@@ -75,7 +75,7 @@ int iommu_dma_supported(struct device *dev, u64 mask)
        /* Copied from i386. Doesn't make much sense, because it will
           only work for pci_alloc_coherent.
           The caller just has to use GFP_DMA in this case. */
        /* Copied from i386. Doesn't make much sense, because it will
           only work for pci_alloc_coherent.
           The caller just has to use GFP_DMA in this case. */
-       if (mask < DMA_24BIT_MASK)
+       if (mask < DMA_BIT_MASK(24))
                return 0;
 
        /* Tell the device to use SAC when IOMMU force is on.  This
                return 0;
 
        /* Tell the device to use SAC when IOMMU force is on.  This
index 10a6be9..f82fdc4 100644 (file)
@@ -238,7 +238,7 @@ static inline unsigned long dma_alloc_coherent_mask(struct device *dev,
 
        dma_mask = dev->coherent_dma_mask;
        if (!dma_mask)
 
        dma_mask = dev->coherent_dma_mask;
        if (!dma_mask)
-               dma_mask = (gfp & GFP_DMA) ? DMA_24BIT_MASK : DMA_BIT_MASK(32);
+               dma_mask = (gfp & GFP_DMA) ? DMA_BIT_MASK(24) : DMA_BIT_MASK(32);
 
        return dma_mask;
 }
 
        return dma_mask;
 }
@@ -247,7 +247,7 @@ static inline gfp_t dma_alloc_coherent_gfp_flags(struct device *dev, gfp_t gfp)
 {
        unsigned long dma_mask = dma_alloc_coherent_mask(dev, gfp);
 
 {
        unsigned long dma_mask = dma_alloc_coherent_mask(dev, gfp);
 
-       if (dma_mask <= DMA_24BIT_MASK)
+       if (dma_mask <= DMA_BIT_MASK(24))
                gfp |= GFP_DMA;
 #ifdef CONFIG_X86_64
        if (dma_mask <= DMA_BIT_MASK(32) && !(gfp & GFP_DMA))
                gfp |= GFP_DMA;
 #ifdef CONFIG_X86_64
        if (dma_mask <= DMA_BIT_MASK(32) && !(gfp & GFP_DMA))
index 136a01d..745579b 100644 (file)
@@ -243,7 +243,7 @@ int dma_supported(struct device *dev, u64 mask)
        /* Copied from i386. Doesn't make much sense, because it will
           only work for pci_alloc_coherent.
           The caller just has to use GFP_DMA in this case. */
        /* Copied from i386. Doesn't make much sense, because it will
           only work for pci_alloc_coherent.
           The caller just has to use GFP_DMA in this case. */
-       if (mask < DMA_24BIT_MASK)
+       if (mask < DMA_BIT_MASK(24))
                return 0;
 
        /* Tell the device to use SAC when IOMMU force is on.  This
                return 0;
 
        /* Tell the device to use SAC when IOMMU force is on.  This
index 479694b..91dba65 100644 (file)
@@ -141,7 +141,7 @@ int isa_register_driver(struct isa_driver *isa_driver, unsigned int ndev)
                isa_dev->dev.release            = isa_dev_release;
                isa_dev->id                     = id;
 
                isa_dev->dev.release            = isa_dev_release;
                isa_dev->id                     = id;
 
-               isa_dev->dev.coherent_dma_mask = DMA_24BIT_MASK;
+               isa_dev->dev.coherent_dma_mask = DMA_BIT_MASK(24);
                isa_dev->dev.dma_mask = &isa_dev->dev.coherent_dma_mask;
 
                error = device_register(&isa_dev->dev);
                isa_dev->dev.dma_mask = &isa_dev->dev.coherent_dma_mask;
 
                error = device_register(&isa_dev->dev);
index efea128..4a651f6 100644 (file)
@@ -167,7 +167,7 @@ struct pnp_card *pnp_alloc_card(struct pnp_protocol *protocol, int id, char *pnp
        card->dev.parent = &card->protocol->dev;
        dev_set_name(&card->dev, "%02x:%02x", card->protocol->number, card->number);
 
        card->dev.parent = &card->protocol->dev;
        dev_set_name(&card->dev, "%02x:%02x", card->protocol->number, card->number);
 
-       card->dev.coherent_dma_mask = DMA_24BIT_MASK;
+       card->dev.coherent_dma_mask = DMA_BIT_MASK(24);
        card->dev.dma_mask = &card->dev.coherent_dma_mask;
 
        dev_id = pnp_add_card_id(card, pnpid);
        card->dev.dma_mask = &card->dev.coherent_dma_mask;
 
        dev_id = pnp_add_card_id(card, pnpid);
index 14814f2..5dba909 100644 (file)
@@ -137,7 +137,7 @@ struct pnp_dev *pnp_alloc_dev(struct pnp_protocol *protocol, int id, char *pnpid
        INIT_LIST_HEAD(&dev->options);
        dev->protocol = protocol;
        dev->number = id;
        INIT_LIST_HEAD(&dev->options);
        dev->protocol = protocol;
        dev->number = id;
-       dev->dma_mask = DMA_24BIT_MASK;
+       dev->dma_mask = DMA_BIT_MASK(24);
 
        dev->dev.parent = &dev->protocol->dev;
        dev->dev.bus = &pnp_bus_type;
 
        dev->dev.parent = &dev->protocol->dev;
        dev->dev.bus = &pnp_bus_type;
index 542a0c6..3dbacde 100644 (file)
@@ -872,8 +872,8 @@ static int __devinit snd_card_als4000_probe(struct pci_dev *pci,
                return err;
        }
        /* check, if we can restrict PCI DMA transfers to 24 bits */
                return err;
        }
        /* check, if we can restrict PCI DMA transfers to 24 bits */
-       if (pci_set_dma_mask(pci, DMA_24BIT_MASK) < 0 ||
-           pci_set_consistent_dma_mask(pci, DMA_24BIT_MASK) < 0) {
+       if (pci_set_dma_mask(pci, DMA_BIT_MASK(24)) < 0 ||
+           pci_set_consistent_dma_mask(pci, DMA_BIT_MASK(24)) < 0) {
                snd_printk(KERN_ERR "architecture does not support 24bit PCI busmaster DMA\n");
                pci_disable_device(pci);
                return -ENXIO;
                snd_printk(KERN_ERR "architecture does not support 24bit PCI busmaster DMA\n");
                pci_disable_device(pci);
                return -ENXIO;
index e9e9b58..f290bc5 100644 (file)
@@ -2125,8 +2125,8 @@ snd_azf3328_create(struct snd_card *card,
        chip->irq = -1;
 
        /* check if we can restrict PCI DMA transfers to 24 bits */
        chip->irq = -1;
 
        /* check if we can restrict PCI DMA transfers to 24 bits */
-       if (pci_set_dma_mask(pci, DMA_24BIT_MASK) < 0 ||
-           pci_set_consistent_dma_mask(pci, DMA_24BIT_MASK) < 0) {
+       if (pci_set_dma_mask(pci, DMA_BIT_MASK(24)) < 0 ||
+           pci_set_consistent_dma_mask(pci, DMA_BIT_MASK(24)) < 0) {
                snd_printk(KERN_ERR "architecture does not support "
                                        "24bit PCI busmaster DMA\n"
                );
                snd_printk(KERN_ERR "architecture does not support "
                                        "24bit PCI busmaster DMA\n"
                );
index dd63b13..fbd2ac0 100644 (file)
@@ -1608,8 +1608,8 @@ static int __devinit snd_es1938_create(struct snd_card *card,
        if ((err = pci_enable_device(pci)) < 0)
                return err;
         /* check, if we can restrict PCI DMA transfers to 24 bits */
        if ((err = pci_enable_device(pci)) < 0)
                return err;
         /* check, if we can restrict PCI DMA transfers to 24 bits */
-       if (pci_set_dma_mask(pci, DMA_24BIT_MASK) < 0 ||
-           pci_set_consistent_dma_mask(pci, DMA_24BIT_MASK) < 0) {
+       if (pci_set_dma_mask(pci, DMA_BIT_MASK(24)) < 0 ||
+           pci_set_consistent_dma_mask(pci, DMA_BIT_MASK(24)) < 0) {
                snd_printk(KERN_ERR "architecture does not support 24bit PCI busmaster DMA\n");
                pci_disable_device(pci);
                 return -ENXIO;
                snd_printk(KERN_ERR "architecture does not support 24bit PCI busmaster DMA\n");
                pci_disable_device(pci);
                 return -ENXIO;
index d989215..7dc60ad 100644 (file)
@@ -1264,8 +1264,8 @@ static int __devinit snd_sonicvibes_create(struct snd_card *card,
        if ((err = pci_enable_device(pci)) < 0)
                return err;
        /* check, if we can restrict PCI DMA transfers to 24 bits */
        if ((err = pci_enable_device(pci)) < 0)
                return err;
        /* check, if we can restrict PCI DMA transfers to 24 bits */
-        if (pci_set_dma_mask(pci, DMA_24BIT_MASK) < 0 ||
-           pci_set_consistent_dma_mask(pci, DMA_24BIT_MASK) < 0) {
+        if (pci_set_dma_mask(pci, DMA_BIT_MASK(24)) < 0 ||
+           pci_set_consistent_dma_mask(pci, DMA_BIT_MASK(24)) < 0) {
                snd_printk(KERN_ERR "architecture does not support 24bit PCI busmaster DMA\n");
                pci_disable_device(pci);
                 return -ENXIO;
                snd_printk(KERN_ERR "architecture does not support 24bit PCI busmaster DMA\n");
                pci_disable_device(pci);
                 return -ENXIO;