diff options
author | Tobias Klauser <tklauser@nuerscht.ch> | 2005-05-16 19:15:11 +0200 |
---|---|---|
committer | Jeff Garzik <jgarzik@pobox.com> | 2005-06-27 23:09:08 -0400 |
commit | cac8c81a59bd3b6815871b3172e8ccf15a3431e0 (patch) | |
tree | 7bc0d43eed52e71c11d25a0e8f91838457ec4a31 /drivers | |
parent | 5f13e7ec5c1d98f4a63a3a79e66b2b121051f5ac (diff) | |
download | lwn-cac8c81a59bd3b6815871b3172e8ccf15a3431e0.tar.gz lwn-cac8c81a59bd3b6815871b3172e8ccf15a3431e0.zip |
[PATCH] Use pci_set_dma_mask() instead of direct assignment of DMA mask
The amd8111e driver directly assigns the DMA mask to the dma_mask
member of the struct pci_dev instead of using pci_set_dma_mask(). This
makes the call to pci_dma_supported() redundant as pci_set_dma_mask()
does this check.
I do not own this device so I only compile-tested this patch.
Signed-off-by: Tobias Klauser <tklauser@nuerscht.ch>
Diffstat (limited to 'drivers')
-rwxr-xr-x | drivers/net/amd8111e.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/net/amd8111e.c b/drivers/net/amd8111e.c index b7dd7260cafb..8618012df06a 100755 --- a/drivers/net/amd8111e.c +++ b/drivers/net/amd8111e.c @@ -87,6 +87,7 @@ Revision History: #include <linux/if_vlan.h> #include <linux/ctype.h> #include <linux/crc32.h> +#include <linux/dma-mapping.h> #include <asm/system.h> #include <asm/io.h> @@ -2006,12 +2007,11 @@ static int __devinit amd8111e_probe_one(struct pci_dev *pdev, } /* Initialize DMA */ - if(!pci_dma_supported(pdev, 0xffffffff)){ + if (pci_set_dma_mask(pdev, DMA_32BIT_MASK) < 0) { printk(KERN_ERR "amd8111e: DMA not supported," "exiting.\n"); - goto err_free_reg; - } else - pdev->dma_mask = 0xffffffff; + goto err_free_reg; + } reg_addr = pci_resource_start(pdev, 0); reg_len = pci_resource_len(pdev, 0); |