@@ -760,7 +760,7 @@ dma_buf_dynamic_attach(struct dma_buf *dmabuf, struct device *dev,
760
760
761
761
if (dma_buf_is_dynamic (attach -> dmabuf )) {
762
762
dma_resv_lock (attach -> dmabuf -> resv , NULL );
763
- ret = dma_buf_pin (attach );
763
+ ret = dmabuf -> ops -> pin (attach );
764
764
if (ret )
765
765
goto err_unlock ;
766
766
}
@@ -786,7 +786,7 @@ dma_buf_dynamic_attach(struct dma_buf *dmabuf, struct device *dev,
786
786
787
787
err_unpin :
788
788
if (dma_buf_is_dynamic (attach -> dmabuf ))
789
- dma_buf_unpin (attach );
789
+ dmabuf -> ops -> unpin (attach );
790
790
791
791
err_unlock :
792
792
if (dma_buf_is_dynamic (attach -> dmabuf ))
@@ -843,7 +843,7 @@ void dma_buf_detach(struct dma_buf *dmabuf, struct dma_buf_attachment *attach)
843
843
__unmap_dma_buf (attach , attach -> sgt , attach -> dir );
844
844
845
845
if (dma_buf_is_dynamic (attach -> dmabuf )) {
846
- dma_buf_unpin (attach );
846
+ dmabuf -> ops -> unpin (attach );
847
847
dma_resv_unlock (attach -> dmabuf -> resv );
848
848
}
849
849
}
@@ -956,7 +956,7 @@ struct sg_table *dma_buf_map_attachment(struct dma_buf_attachment *attach,
956
956
if (dma_buf_is_dynamic (attach -> dmabuf )) {
957
957
dma_resv_assert_held (attach -> dmabuf -> resv );
958
958
if (!IS_ENABLED (CONFIG_DMABUF_MOVE_NOTIFY )) {
959
- r = dma_buf_pin (attach );
959
+ r = attach -> dmabuf -> ops -> pin (attach );
960
960
if (r )
961
961
return ERR_PTR (r );
962
962
}
@@ -968,7 +968,7 @@ struct sg_table *dma_buf_map_attachment(struct dma_buf_attachment *attach,
968
968
969
969
if (IS_ERR (sg_table ) && dma_buf_is_dynamic (attach -> dmabuf ) &&
970
970
!IS_ENABLED (CONFIG_DMABUF_MOVE_NOTIFY ))
971
- dma_buf_unpin (attach );
971
+ attach -> dmabuf -> ops -> unpin (attach );
972
972
973
973
if (!IS_ERR (sg_table ) && attach -> dmabuf -> ops -> cache_sgt_mapping ) {
974
974
attach -> sgt = sg_table ;
0 commit comments