Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit e930438c authored by Yang Hongyang's avatar Yang Hongyang Committed by Linus Torvalds
Browse files

Replace all DMA_nBIT_MASK macro with DMA_BIT_MASK(n)



This is the second go through of the old DMA_nBIT_MASK macro,and there're not
so many of them left,so I put them into one patch.I hope this is the last round.
After this the definition of the old DMA_nBIT_MASK macro could be removed.

Signed-off-by: default avatarYang Hongyang <yanghy@cn.fujitsu.com>
Cc: Russell King <rmk@arm.linux.org.uk>
Cc: Tony Lindgren <tony@atomide.com>
Cc: "David S. Miller" <davem@davemloft.net>
Cc: James Bottomley <James.Bottomley@HansenPartnership.com>
Cc: Greg KH <greg@kroah.com>
Cc: Takashi Iwai <tiwai@suse.de>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent 316cb4ef
Loading
Loading
Loading
Loading
+4 −4
Original line number Diff line number Diff line
@@ -131,14 +131,14 @@ static struct musb_hdrc_platform_data musb_plat = {
	.power		= 50,			/* up to 100 mA */
};

static u64 musb_dmamask = DMA_32BIT_MASK;
static u64 musb_dmamask = DMA_BIT_MASK(32);

static struct platform_device musb_device = {
	.name		= "musb_hdrc",
	.id		= -1,
	.dev = {
		.dma_mask		= &musb_dmamask,
		.coherent_dma_mask	= DMA_32BIT_MASK,
		.coherent_dma_mask	= DMA_BIT_MASK(32),
		.platform_data		= &musb_plat,
	},
	.num_resources	= ARRAY_SIZE(musb_resources),
@@ -146,14 +146,14 @@ static struct platform_device musb_device = {
};

#ifdef CONFIG_NOP_USB_XCEIV
static u64 nop_xceiv_dmamask = DMA_32BIT_MASK;
static u64 nop_xceiv_dmamask = DMA_BIT_MASK(32);

static struct platform_device nop_xceiv_device = {
	.name		= "nop_usb_xceiv",
	.id		= -1,
	.dev = {
		.dma_mask		= &nop_xceiv_dmamask,
		.coherent_dma_mask	= DMA_32BIT_MASK,
		.coherent_dma_mask	= DMA_BIT_MASK(32),
		.platform_data		= NULL,
	},
};
+1 −1
Original line number Diff line number Diff line
@@ -16,7 +16,7 @@ EXPORT_SYMBOL(swiotlb);
static void *ia64_swiotlb_alloc_coherent(struct device *dev, size_t size,
					 dma_addr_t *dma_handle, gfp_t gfp)
{
	if (dev->coherent_dma_mask != DMA_64BIT_MASK)
	if (dev->coherent_dma_mask != DMA_BIT_MASK(64))
		gfp |= GFP_DMA;
	return swiotlb_alloc_coherent(dev, size, dma_handle, gfp);
}
+1 −1
Original line number Diff line number Diff line
@@ -1059,7 +1059,7 @@ static int fpga_probe(struct pci_dev *dev, const struct pci_device_id *id)
		goto out;
	}

	err = pci_set_dma_mask(dev, DMA_32BIT_MASK);
	err = pci_set_dma_mask(dev, DMA_BIT_MASK(32));
	if (err) {
		dev_warn(&dev->dev, "Failed to set 32-bit DMA mask\n");
		goto out;
+1 −1
Original line number Diff line number Diff line
@@ -3505,7 +3505,7 @@ static __devinit int cciss_message(struct pci_dev *pdev, unsigned char opcode, u
	/* The Inbound Post Queue only accepts 32-bit physical addresses for the
	   CCISS commands, so they must be allocated from the lower 4GiB of
	   memory. */
	err = pci_set_consistent_dma_mask(pdev, DMA_32BIT_MASK);
	err = pci_set_consistent_dma_mask(pdev, DMA_BIT_MASK(32));
	if (err) {
		iounmap(vaddr);
		return -ENOMEM;
+2 −2
Original line number Diff line number Diff line
@@ -2532,8 +2532,8 @@ static int __devinit atl1c_probe(struct pci_dev *pdev,
	 * various kernel subsystems to support the mechanics required by a
	 * fixed-high-32-bit system.
	 */
	if ((pci_set_dma_mask(pdev, DMA_32BIT_MASK) != 0) ||
	    (pci_set_consistent_dma_mask(pdev, DMA_32BIT_MASK) != 0)) {
	if ((pci_set_dma_mask(pdev, DMA_BIT_MASK(32)) != 0) ||
	    (pci_set_consistent_dma_mask(pdev, DMA_BIT_MASK(32)) != 0)) {
		dev_err(&pdev->dev, "No usable DMA configuration,aborting\n");
		goto err_dma;
	}
Loading