@@ -760,7 +760,7 @@ dma_buf_dynamic_attach(struct dma_buf *dmabuf, struct device *dev,
760760
761761 if (dma_buf_is_dynamic (attach -> dmabuf )) {
762762 dma_resv_lock (attach -> dmabuf -> resv , NULL );
763- ret = dma_buf_pin (attach );
763+ ret = dmabuf -> ops -> pin (attach );
764764 if (ret )
765765 goto err_unlock ;
766766 }
@@ -786,7 +786,7 @@ dma_buf_dynamic_attach(struct dma_buf *dmabuf, struct device *dev,
786786
787787err_unpin :
788788 if (dma_buf_is_dynamic (attach -> dmabuf ))
789- dma_buf_unpin (attach );
789+ dmabuf -> ops -> unpin (attach );
790790
791791err_unlock :
792792 if (dma_buf_is_dynamic (attach -> dmabuf ))
@@ -843,7 +843,7 @@ void dma_buf_detach(struct dma_buf *dmabuf, struct dma_buf_attachment *attach)
843843 __unmap_dma_buf (attach , attach -> sgt , attach -> dir );
844844
845845 if (dma_buf_is_dynamic (attach -> dmabuf )) {
846- dma_buf_unpin (attach );
846+ dmabuf -> ops -> unpin (attach );
847847 dma_resv_unlock (attach -> dmabuf -> resv );
848848 }
849849 }
@@ -956,7 +956,7 @@ struct sg_table *dma_buf_map_attachment(struct dma_buf_attachment *attach,
956956 if (dma_buf_is_dynamic (attach -> dmabuf )) {
957957 dma_resv_assert_held (attach -> dmabuf -> resv );
958958 if (!IS_ENABLED (CONFIG_DMABUF_MOVE_NOTIFY )) {
959- r = dma_buf_pin (attach );
959+ r = attach -> dmabuf -> ops -> pin (attach );
960960 if (r )
961961 return ERR_PTR (r );
962962 }
@@ -968,7 +968,7 @@ struct sg_table *dma_buf_map_attachment(struct dma_buf_attachment *attach,
968968
969969 if (IS_ERR (sg_table ) && dma_buf_is_dynamic (attach -> dmabuf ) &&
970970 !IS_ENABLED (CONFIG_DMABUF_MOVE_NOTIFY ))
971- dma_buf_unpin (attach );
971+ attach -> dmabuf -> ops -> unpin (attach );
972972
973973 if (!IS_ERR (sg_table ) && attach -> dmabuf -> ops -> cache_sgt_mapping ) {
974974 attach -> sgt = sg_table ;
0 commit comments