@@ -563,11 +563,11 @@ static struct fsl_qdma_queue
563563 /*
564564 * Buffer for queue command
565565 */
566- status_head -> cq = dma_alloc_coherent (& pdev -> dev ,
567- sizeof (struct fsl_qdma_format ) *
568- status_size ,
569- & status_head -> bus_addr ,
570- GFP_KERNEL );
566+ status_head -> cq = dmam_alloc_coherent (& pdev -> dev ,
567+ sizeof (struct fsl_qdma_format ) *
568+ status_size ,
569+ & status_head -> bus_addr ,
570+ GFP_KERNEL );
571571 if (!status_head -> cq ) {
572572 devm_kfree (& pdev -> dev , status_head );
573573 return NULL ;
@@ -1268,8 +1268,6 @@ static void fsl_qdma_cleanup_vchan(struct dma_device *dmadev)
12681268
12691269static int fsl_qdma_remove (struct platform_device * pdev )
12701270{
1271- int i ;
1272- struct fsl_qdma_queue * status ;
12731271 struct device_node * np = pdev -> dev .of_node ;
12741272 struct fsl_qdma_engine * fsl_qdma = platform_get_drvdata (pdev );
12751273
@@ -1278,11 +1276,6 @@ static int fsl_qdma_remove(struct platform_device *pdev)
12781276 of_dma_controller_free (np );
12791277 dma_async_device_unregister (& fsl_qdma -> dma_dev );
12801278
1281- for (i = 0 ; i < fsl_qdma -> block_number ; i ++ ) {
1282- status = fsl_qdma -> status [i ];
1283- dma_free_coherent (& pdev -> dev , sizeof (struct fsl_qdma_format ) *
1284- status -> n_cq , status -> cq , status -> bus_addr );
1285- }
12861279 return 0 ;
12871280}
12881281
0 commit comments