File tree Expand file tree Collapse file tree 1 file changed +1
-12
lines changed Expand file tree Collapse file tree 1 file changed +1
-12
lines changed Original file line number Diff line number Diff line change 7
7
#include <linux/clk.h>
8
8
#include <linux/device.h>
9
9
#include <linux/dma-direction.h>
10
- #include <linux/dma-iommu.h>
11
10
#include <linux/dma-mapping.h>
12
11
#include <linux/err.h>
13
12
#include <linux/errno.h>
@@ -610,14 +609,10 @@ static struct iommu_domain *sun50i_iommu_domain_alloc(unsigned type)
610
609
if (!sun50i_domain )
611
610
return NULL ;
612
611
613
- if (type == IOMMU_DOMAIN_DMA &&
614
- iommu_get_dma_cookie (& sun50i_domain -> domain ))
615
- goto err_free_domain ;
616
-
617
612
sun50i_domain -> dt = (u32 * )__get_free_pages (GFP_KERNEL | __GFP_ZERO ,
618
613
get_order (DT_SIZE ));
619
614
if (!sun50i_domain -> dt )
620
- goto err_put_cookie ;
615
+ goto err_free_domain ;
621
616
622
617
refcount_set (& sun50i_domain -> refcnt , 1 );
623
618
@@ -627,10 +622,6 @@ static struct iommu_domain *sun50i_iommu_domain_alloc(unsigned type)
627
622
628
623
return & sun50i_domain -> domain ;
629
624
630
- err_put_cookie :
631
- if (type == IOMMU_DOMAIN_DMA )
632
- iommu_put_dma_cookie (& sun50i_domain -> domain );
633
-
634
625
err_free_domain :
635
626
kfree (sun50i_domain );
636
627
@@ -644,8 +635,6 @@ static void sun50i_iommu_domain_free(struct iommu_domain *domain)
644
635
free_pages ((unsigned long )sun50i_domain -> dt , get_order (DT_SIZE ));
645
636
sun50i_domain -> dt = NULL ;
646
637
647
- iommu_put_dma_cookie (domain );
648
-
649
638
kfree (sun50i_domain );
650
639
}
651
640
You can’t perform that action at this time.
0 commit comments