diff options
author | FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp> | 2010-03-10 18:23:38 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2010-03-12 18:52:42 -0500 |
commit | e3c4bccabaf3e5c13f4b307c7737cbe8d0cecd02 (patch) | |
tree | e486608f8a24af1a7839ea28915a3b36dc568305 /drivers/pci | |
parent | c186caca3dbe7f44da624cb4f9d78e1b1dfb13b8 (diff) |
dma-mapping: pci: convert pci_set_dma_mask to call dma_set_mask
This changes pci_set_dma_mask to call the generic DMA API, dma_set_mask.
pci_set_dma_mask (in drivers/pci/pci.c) does the same things that
dma_set_mask does on all the architectures that use pci_set_dma_mask;
calls dma_supprted and sets dev->dma_mask. So we safely change
pci_set_dma_mask to simply call dma_set_mask.
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Cc: James Bottomley <James.Bottomley@suse.de>
Cc: David S. Miller <davem@davemloft.net>
Cc: Jesse Barnes <jbarnes@virtuousgeek.org>
Acked-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Russell King <linux@arm.linux.org.uk>
Cc: Greg KH <greg@kroah.com>
Cc: Kay Sievers <kay.sievers@vrfy.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'drivers/pci')
-rw-r--r-- | drivers/pci/pci.c | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/drivers/pci/pci.c b/drivers/pci/pci.c index fdcf01af6762..b2d23d1b0d41 100644 --- a/drivers/pci/pci.c +++ b/drivers/pci/pci.c | |||
@@ -2305,15 +2305,13 @@ void pci_msi_off(struct pci_dev *dev) | |||
2305 | int | 2305 | int |
2306 | pci_set_dma_mask(struct pci_dev *dev, u64 mask) | 2306 | pci_set_dma_mask(struct pci_dev *dev, u64 mask) |
2307 | { | 2307 | { |
2308 | if (!pci_dma_supported(dev, mask)) | 2308 | int ret = dma_set_mask(&dev->dev, mask); |
2309 | return -EIO; | 2309 | if (ret) |
2310 | 2310 | return ret; | |
2311 | dev->dma_mask = mask; | ||
2312 | dev_dbg(&dev->dev, "using %dbit DMA mask\n", fls64(mask)); | 2311 | dev_dbg(&dev->dev, "using %dbit DMA mask\n", fls64(mask)); |
2313 | |||
2314 | return 0; | 2312 | return 0; |
2315 | } | 2313 | } |
2316 | 2314 | ||
2317 | int | 2315 | int |
2318 | pci_set_consistent_dma_mask(struct pci_dev *dev, u64 mask) | 2316 | pci_set_consistent_dma_mask(struct pci_dev *dev, u64 mask) |
2319 | { | 2317 | { |