diff options
Diffstat (limited to 'lib/dma-debug.c')
-rw-r--r-- | lib/dma-debug.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/lib/dma-debug.c b/lib/dma-debug.c index cf906201aecf..ba8b67039d13 100644 --- a/lib/dma-debug.c +++ b/lib/dma-debug.c | |||
@@ -587,7 +587,7 @@ out_unlock: | |||
587 | return count; | 587 | return count; |
588 | } | 588 | } |
589 | 589 | ||
590 | const struct file_operations filter_fops = { | 590 | static const struct file_operations filter_fops = { |
591 | .read = filter_read, | 591 | .read = filter_read, |
592 | .write = filter_write, | 592 | .write = filter_write, |
593 | }; | 593 | }; |
@@ -913,6 +913,9 @@ static void check_sync(struct device *dev, | |||
913 | ref->size); | 913 | ref->size); |
914 | } | 914 | } |
915 | 915 | ||
916 | if (entry->direction == DMA_BIDIRECTIONAL) | ||
917 | goto out; | ||
918 | |||
916 | if (ref->direction != entry->direction) { | 919 | if (ref->direction != entry->direction) { |
917 | err_printk(dev, entry, "DMA-API: device driver syncs " | 920 | err_printk(dev, entry, "DMA-API: device driver syncs " |
918 | "DMA memory with different direction " | 921 | "DMA memory with different direction " |
@@ -923,9 +926,6 @@ static void check_sync(struct device *dev, | |||
923 | dir2name[ref->direction]); | 926 | dir2name[ref->direction]); |
924 | } | 927 | } |
925 | 928 | ||
926 | if (entry->direction == DMA_BIDIRECTIONAL) | ||
927 | goto out; | ||
928 | |||
929 | if (to_cpu && !(entry->direction == DMA_FROM_DEVICE) && | 929 | if (to_cpu && !(entry->direction == DMA_FROM_DEVICE) && |
930 | !(ref->direction == DMA_TO_DEVICE)) | 930 | !(ref->direction == DMA_TO_DEVICE)) |
931 | err_printk(dev, entry, "DMA-API: device driver syncs " | 931 | err_printk(dev, entry, "DMA-API: device driver syncs " |
@@ -948,7 +948,6 @@ static void check_sync(struct device *dev, | |||
948 | 948 | ||
949 | out: | 949 | out: |
950 | put_hash_bucket(bucket, &flags); | 950 | put_hash_bucket(bucket, &flags); |
951 | |||
952 | } | 951 | } |
953 | 952 | ||
954 | void debug_dma_map_page(struct device *dev, struct page *page, size_t offset, | 953 | void debug_dma_map_page(struct device *dev, struct page *page, size_t offset, |