diff options
author | Logan Gunthorpe <logang@deltatee.com> | 2017-04-19 15:36:10 -0400 |
---|---|---|
committer | Sumit Semwal <sumit.semwal@linaro.org> | 2017-04-20 04:17:46 -0400 |
commit | f9b67f0014cba18f1aabb6fa9272335a043eb6fd (patch) | |
tree | 5fe31e4516162430d1e401e9034a2cc7629b5bb2 /drivers/dma-buf | |
parent | 418d59ef229290a1da80aa25222f9da2ac2fa6a5 (diff) |
dma-buf: Rename dma-ops to prevent conflict with kunmap_atomic macro
Seeing the kunmap_atomic dma_buf_ops share the same name with a macro
in highmem.h, the former can be aliased if any dma-buf user includes
that header.
I'm personally trying to include highmem.h inside scatterlist.h and this
breaks the dma-buf code proper.
Christoph Hellwig suggested [1] renaming it and pushing this patch ASAP.
To maintain consistency I've renamed all four of kmap* and kunmap* to be
map* and unmap*. (Even though only kmap_atomic presently conflicts.)
[1] https://www.spinics.net/lists/target-devel/msg15070.html
Signed-off-by: Logan Gunthorpe <logang@deltatee.com>
Reviewed-by: Sinclair Yeh <syeh@vmware.com>
Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Acked-by: Sumit Semwal <sumit.semwal@linaro.org>
Signed-off-by: Sumit Semwal <sumit.semwal@linaro.org>
Link: http://patchwork.freedesktop.org/patch/msgid/1492630570-879-1-git-send-email-logang@deltatee.com
Diffstat (limited to 'drivers/dma-buf')
-rw-r--r-- | drivers/dma-buf/dma-buf.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/drivers/dma-buf/dma-buf.c b/drivers/dma-buf/dma-buf.c index f72aaacbe023..512bdbc23bbb 100644 --- a/drivers/dma-buf/dma-buf.c +++ b/drivers/dma-buf/dma-buf.c | |||
@@ -405,8 +405,8 @@ struct dma_buf *dma_buf_export(const struct dma_buf_export_info *exp_info) | |||
405 | || !exp_info->ops->map_dma_buf | 405 | || !exp_info->ops->map_dma_buf |
406 | || !exp_info->ops->unmap_dma_buf | 406 | || !exp_info->ops->unmap_dma_buf |
407 | || !exp_info->ops->release | 407 | || !exp_info->ops->release |
408 | || !exp_info->ops->kmap_atomic | 408 | || !exp_info->ops->map_atomic |
409 | || !exp_info->ops->kmap | 409 | || !exp_info->ops->map |
410 | || !exp_info->ops->mmap)) { | 410 | || !exp_info->ops->mmap)) { |
411 | return ERR_PTR(-EINVAL); | 411 | return ERR_PTR(-EINVAL); |
412 | } | 412 | } |
@@ -872,7 +872,7 @@ void *dma_buf_kmap_atomic(struct dma_buf *dmabuf, unsigned long page_num) | |||
872 | { | 872 | { |
873 | WARN_ON(!dmabuf); | 873 | WARN_ON(!dmabuf); |
874 | 874 | ||
875 | return dmabuf->ops->kmap_atomic(dmabuf, page_num); | 875 | return dmabuf->ops->map_atomic(dmabuf, page_num); |
876 | } | 876 | } |
877 | EXPORT_SYMBOL_GPL(dma_buf_kmap_atomic); | 877 | EXPORT_SYMBOL_GPL(dma_buf_kmap_atomic); |
878 | 878 | ||
@@ -889,8 +889,8 @@ void dma_buf_kunmap_atomic(struct dma_buf *dmabuf, unsigned long page_num, | |||
889 | { | 889 | { |
890 | WARN_ON(!dmabuf); | 890 | WARN_ON(!dmabuf); |
891 | 891 | ||
892 | if (dmabuf->ops->kunmap_atomic) | 892 | if (dmabuf->ops->unmap_atomic) |
893 | dmabuf->ops->kunmap_atomic(dmabuf, page_num, vaddr); | 893 | dmabuf->ops->unmap_atomic(dmabuf, page_num, vaddr); |
894 | } | 894 | } |
895 | EXPORT_SYMBOL_GPL(dma_buf_kunmap_atomic); | 895 | EXPORT_SYMBOL_GPL(dma_buf_kunmap_atomic); |
896 | 896 | ||
@@ -907,7 +907,7 @@ void *dma_buf_kmap(struct dma_buf *dmabuf, unsigned long page_num) | |||
907 | { | 907 | { |
908 | WARN_ON(!dmabuf); | 908 | WARN_ON(!dmabuf); |
909 | 909 | ||
910 | return dmabuf->ops->kmap(dmabuf, page_num); | 910 | return dmabuf->ops->map(dmabuf, page_num); |
911 | } | 911 | } |
912 | EXPORT_SYMBOL_GPL(dma_buf_kmap); | 912 | EXPORT_SYMBOL_GPL(dma_buf_kmap); |
913 | 913 | ||
@@ -924,8 +924,8 @@ void dma_buf_kunmap(struct dma_buf *dmabuf, unsigned long page_num, | |||
924 | { | 924 | { |
925 | WARN_ON(!dmabuf); | 925 | WARN_ON(!dmabuf); |
926 | 926 | ||
927 | if (dmabuf->ops->kunmap) | 927 | if (dmabuf->ops->unmap) |
928 | dmabuf->ops->kunmap(dmabuf, page_num, vaddr); | 928 | dmabuf->ops->unmap(dmabuf, page_num, vaddr); |
929 | } | 929 | } |
930 | EXPORT_SYMBOL_GPL(dma_buf_kunmap); | 930 | EXPORT_SYMBOL_GPL(dma_buf_kunmap); |
931 | 931 | ||