diff options
author | David S. Miller <davem@davemloft.net> | 2008-08-27 02:00:58 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2008-08-29 05:13:13 -0400 |
commit | 260489fa8a9735c76073ace95f03ffaf10cca884 (patch) | |
tree | 5cc56f69ba16de24886bb8fbab34f2404554ce31 /arch/sparc/kernel/ioport.c | |
parent | 7a715f46012f3552294154978aed59cba9804928 (diff) |
sparc32: Make mmu_{get,release}_*() take a struct device pointer.
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'arch/sparc/kernel/ioport.c')
-rw-r--r-- | arch/sparc/kernel/ioport.c | 17 |
1 files changed, 4 insertions, 13 deletions
diff --git a/arch/sparc/kernel/ioport.c b/arch/sparc/kernel/ioport.c index aa73b3b71e85..11dccf945153 100644 --- a/arch/sparc/kernel/ioport.c +++ b/arch/sparc/kernel/ioport.c | |||
@@ -394,8 +394,6 @@ void sbus_free_consistent(struct device *dev, long n, void *p, u32 ba) | |||
394 | */ | 394 | */ |
395 | dma_addr_t sbus_map_single(struct device *dev, void *va, size_t len, int direction) | 395 | dma_addr_t sbus_map_single(struct device *dev, void *va, size_t len, int direction) |
396 | { | 396 | { |
397 | struct sbus_dev *sdev = to_sbus_device(dev); | ||
398 | |||
399 | /* XXX why are some lengths signed, others unsigned? */ | 397 | /* XXX why are some lengths signed, others unsigned? */ |
400 | if (len <= 0) { | 398 | if (len <= 0) { |
401 | return 0; | 399 | return 0; |
@@ -404,20 +402,17 @@ dma_addr_t sbus_map_single(struct device *dev, void *va, size_t len, int directi | |||
404 | if (len > 256*1024) { /* __get_free_pages() limit */ | 402 | if (len > 256*1024) { /* __get_free_pages() limit */ |
405 | return 0; | 403 | return 0; |
406 | } | 404 | } |
407 | return mmu_get_scsi_one(va, len, sdev->bus); | 405 | return mmu_get_scsi_one(dev, va, len); |
408 | } | 406 | } |
409 | 407 | ||
410 | void sbus_unmap_single(struct device *dev, dma_addr_t ba, size_t n, int direction) | 408 | void sbus_unmap_single(struct device *dev, dma_addr_t ba, size_t n, int direction) |
411 | { | 409 | { |
412 | struct sbus_dev *sdev = to_sbus_device(dev); | 410 | mmu_release_scsi_one(dev, ba, n); |
413 | mmu_release_scsi_one(ba, n, sdev->bus); | ||
414 | } | 411 | } |
415 | 412 | ||
416 | int sbus_map_sg(struct device *dev, struct scatterlist *sg, int n, int direction) | 413 | int sbus_map_sg(struct device *dev, struct scatterlist *sg, int n, int direction) |
417 | { | 414 | { |
418 | struct sbus_dev *sdev = to_sbus_device(dev); | 415 | mmu_get_scsi_sgl(dev, sg, n); |
419 | |||
420 | mmu_get_scsi_sgl(sg, n, sdev->bus); | ||
421 | 416 | ||
422 | /* | 417 | /* |
423 | * XXX sparc64 can return a partial length here. sun4c should do this | 418 | * XXX sparc64 can return a partial length here. sun4c should do this |
@@ -428,9 +423,7 @@ int sbus_map_sg(struct device *dev, struct scatterlist *sg, int n, int direction | |||
428 | 423 | ||
429 | void sbus_unmap_sg(struct device *dev, struct scatterlist *sg, int n, int direction) | 424 | void sbus_unmap_sg(struct device *dev, struct scatterlist *sg, int n, int direction) |
430 | { | 425 | { |
431 | struct sbus_dev *sdev = to_sbus_device(dev); | 426 | mmu_release_scsi_sgl(dev, sg, n); |
432 | |||
433 | mmu_release_scsi_sgl(sg, n, sdev->bus); | ||
434 | } | 427 | } |
435 | 428 | ||
436 | /* | 429 | /* |
@@ -438,7 +431,6 @@ void sbus_unmap_sg(struct device *dev, struct scatterlist *sg, int n, int direct | |||
438 | void sbus_dma_sync_single_for_cpu(struct device *dev, dma_addr_t ba, size_t size, int direction) | 431 | void sbus_dma_sync_single_for_cpu(struct device *dev, dma_addr_t ba, size_t size, int direction) |
439 | { | 432 | { |
440 | #if 0 | 433 | #if 0 |
441 | struct sbus_dev *sdev = to_sbus_device(dev); | ||
442 | unsigned long va; | 434 | unsigned long va; |
443 | struct resource *res; | 435 | struct resource *res; |
444 | 436 | ||
@@ -459,7 +451,6 @@ void sbus_dma_sync_single_for_cpu(struct device *dev, dma_addr_t ba, size_t size | |||
459 | void sbus_dma_sync_single_for_device(struct device *dev, dma_addr_t ba, size_t size, int direction) | 451 | void sbus_dma_sync_single_for_device(struct device *dev, dma_addr_t ba, size_t size, int direction) |
460 | { | 452 | { |
461 | #if 0 | 453 | #if 0 |
462 | struct sbus_dev *sdev = to_sbus_device(dev); | ||
463 | unsigned long va; | 454 | unsigned long va; |
464 | struct resource *res; | 455 | struct resource *res; |
465 | 456 | ||