diff options
author | Michael Buesch <mb@bu3sch.de> | 2008-04-11 06:16:36 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2008-04-15 15:04:35 -0400 |
commit | cdbbe3d1f53086ece706674d3bf4f6d148083694 (patch) | |
tree | e2b9dfde89f4dfdabd141d740a34d4d069343315 /drivers/net | |
parent | 4ac58469f13028e1eb97f8bc7b0fca5072591d8d (diff) |
b43legacy: Fix usage of struct device used for DMAing
This fixes b43legacy for the SSB DMA API change.
Signed-off-by: Michael Buesch <mb@bu3sch.de>
Cc: Stefano Brivio <stefano.brivio@polimi.it>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net')
-rw-r--r-- | drivers/net/wireless/b43legacy/dma.c | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/drivers/net/wireless/b43legacy/dma.c b/drivers/net/wireless/b43legacy/dma.c index e87b427d5e43..59300486f48e 100644 --- a/drivers/net/wireless/b43legacy/dma.c +++ b/drivers/net/wireless/b43legacy/dma.c | |||
@@ -393,11 +393,11 @@ dma_addr_t map_descbuffer(struct b43legacy_dmaring *ring, | |||
393 | dma_addr_t dmaaddr; | 393 | dma_addr_t dmaaddr; |
394 | 394 | ||
395 | if (tx) | 395 | if (tx) |
396 | dmaaddr = dma_map_single(ring->dev->dev->dev, | 396 | dmaaddr = dma_map_single(ring->dev->dev->dma_dev, |
397 | buf, len, | 397 | buf, len, |
398 | DMA_TO_DEVICE); | 398 | DMA_TO_DEVICE); |
399 | else | 399 | else |
400 | dmaaddr = dma_map_single(ring->dev->dev->dev, | 400 | dmaaddr = dma_map_single(ring->dev->dev->dma_dev, |
401 | buf, len, | 401 | buf, len, |
402 | DMA_FROM_DEVICE); | 402 | DMA_FROM_DEVICE); |
403 | 403 | ||
@@ -411,11 +411,11 @@ void unmap_descbuffer(struct b43legacy_dmaring *ring, | |||
411 | int tx) | 411 | int tx) |
412 | { | 412 | { |
413 | if (tx) | 413 | if (tx) |
414 | dma_unmap_single(ring->dev->dev->dev, | 414 | dma_unmap_single(ring->dev->dev->dma_dev, |
415 | addr, len, | 415 | addr, len, |
416 | DMA_TO_DEVICE); | 416 | DMA_TO_DEVICE); |
417 | else | 417 | else |
418 | dma_unmap_single(ring->dev->dev->dev, | 418 | dma_unmap_single(ring->dev->dev->dma_dev, |
419 | addr, len, | 419 | addr, len, |
420 | DMA_FROM_DEVICE); | 420 | DMA_FROM_DEVICE); |
421 | } | 421 | } |
@@ -427,7 +427,7 @@ void sync_descbuffer_for_cpu(struct b43legacy_dmaring *ring, | |||
427 | { | 427 | { |
428 | B43legacy_WARN_ON(ring->tx); | 428 | B43legacy_WARN_ON(ring->tx); |
429 | 429 | ||
430 | dma_sync_single_for_cpu(ring->dev->dev->dev, | 430 | dma_sync_single_for_cpu(ring->dev->dev->dma_dev, |
431 | addr, len, DMA_FROM_DEVICE); | 431 | addr, len, DMA_FROM_DEVICE); |
432 | } | 432 | } |
433 | 433 | ||
@@ -438,7 +438,7 @@ void sync_descbuffer_for_device(struct b43legacy_dmaring *ring, | |||
438 | { | 438 | { |
439 | B43legacy_WARN_ON(ring->tx); | 439 | B43legacy_WARN_ON(ring->tx); |
440 | 440 | ||
441 | dma_sync_single_for_device(ring->dev->dev->dev, | 441 | dma_sync_single_for_device(ring->dev->dev->dma_dev, |
442 | addr, len, DMA_FROM_DEVICE); | 442 | addr, len, DMA_FROM_DEVICE); |
443 | } | 443 | } |
444 | 444 | ||
@@ -458,9 +458,9 @@ void free_descriptor_buffer(struct b43legacy_dmaring *ring, | |||
458 | 458 | ||
459 | static int alloc_ringmemory(struct b43legacy_dmaring *ring) | 459 | static int alloc_ringmemory(struct b43legacy_dmaring *ring) |
460 | { | 460 | { |
461 | struct device *dev = ring->dev->dev->dev; | 461 | struct device *dma_dev = ring->dev->dev->dma_dev; |
462 | 462 | ||
463 | ring->descbase = dma_alloc_coherent(dev, B43legacy_DMA_RINGMEMSIZE, | 463 | ring->descbase = dma_alloc_coherent(dma_dev, B43legacy_DMA_RINGMEMSIZE, |
464 | &(ring->dmabase), GFP_KERNEL); | 464 | &(ring->dmabase), GFP_KERNEL); |
465 | if (!ring->descbase) { | 465 | if (!ring->descbase) { |
466 | b43legacyerr(ring->dev->wl, "DMA ringmemory allocation" | 466 | b43legacyerr(ring->dev->wl, "DMA ringmemory allocation" |
@@ -474,9 +474,9 @@ static int alloc_ringmemory(struct b43legacy_dmaring *ring) | |||
474 | 474 | ||
475 | static void free_ringmemory(struct b43legacy_dmaring *ring) | 475 | static void free_ringmemory(struct b43legacy_dmaring *ring) |
476 | { | 476 | { |
477 | struct device *dev = ring->dev->dev->dev; | 477 | struct device *dma_dev = ring->dev->dev->dma_dev; |
478 | 478 | ||
479 | dma_free_coherent(dev, B43legacy_DMA_RINGMEMSIZE, | 479 | dma_free_coherent(dma_dev, B43legacy_DMA_RINGMEMSIZE, |
480 | ring->descbase, ring->dmabase); | 480 | ring->descbase, ring->dmabase); |
481 | } | 481 | } |
482 | 482 | ||
@@ -886,7 +886,7 @@ struct b43legacy_dmaring *b43legacy_setup_dmaring(struct b43legacy_wldev *dev, | |||
886 | goto err_kfree_meta; | 886 | goto err_kfree_meta; |
887 | 887 | ||
888 | /* test for ability to dma to txhdr_cache */ | 888 | /* test for ability to dma to txhdr_cache */ |
889 | dma_test = dma_map_single(dev->dev->dev, ring->txhdr_cache, | 889 | dma_test = dma_map_single(dev->dev->dma_dev, ring->txhdr_cache, |
890 | sizeof(struct b43legacy_txhdr_fw3), | 890 | sizeof(struct b43legacy_txhdr_fw3), |
891 | DMA_TO_DEVICE); | 891 | DMA_TO_DEVICE); |
892 | 892 | ||
@@ -900,7 +900,7 @@ struct b43legacy_dmaring *b43legacy_setup_dmaring(struct b43legacy_wldev *dev, | |||
900 | if (!ring->txhdr_cache) | 900 | if (!ring->txhdr_cache) |
901 | goto err_kfree_meta; | 901 | goto err_kfree_meta; |
902 | 902 | ||
903 | dma_test = dma_map_single(dev->dev->dev, | 903 | dma_test = dma_map_single(dev->dev->dma_dev, |
904 | ring->txhdr_cache, | 904 | ring->txhdr_cache, |
905 | sizeof(struct b43legacy_txhdr_fw3), | 905 | sizeof(struct b43legacy_txhdr_fw3), |
906 | DMA_TO_DEVICE); | 906 | DMA_TO_DEVICE); |
@@ -910,7 +910,7 @@ struct b43legacy_dmaring *b43legacy_setup_dmaring(struct b43legacy_wldev *dev, | |||
910 | goto err_kfree_txhdr_cache; | 910 | goto err_kfree_txhdr_cache; |
911 | } | 911 | } |
912 | 912 | ||
913 | dma_unmap_single(dev->dev->dev, | 913 | dma_unmap_single(dev->dev->dma_dev, |
914 | dma_test, sizeof(struct b43legacy_txhdr_fw3), | 914 | dma_test, sizeof(struct b43legacy_txhdr_fw3), |
915 | DMA_TO_DEVICE); | 915 | DMA_TO_DEVICE); |
916 | } | 916 | } |