summaryrefslogtreecommitdiffstats
path: root/drivers/slimbus
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/slimbus')
-rw-r--r--drivers/slimbus/qcom-ctrl.c12
1 files changed, 4 insertions, 8 deletions
diff --git a/drivers/slimbus/qcom-ctrl.c b/drivers/slimbus/qcom-ctrl.c
index f51de1277912..fb1a5e0eb8dd 100644
--- a/drivers/slimbus/qcom-ctrl.c
+++ b/drivers/slimbus/qcom-ctrl.c
@@ -13,7 +13,6 @@
#include <linux/delay.h>
#include <linux/clk.h>
#include <linux/of.h>
-#include <linux/dma-mapping.h>
#include <linux/pm_runtime.h>
#include "slimbus.h"
@@ -93,7 +92,6 @@
struct slim_ctrl_buf {
void *base;
- dma_addr_t phy;
spinlock_t lock;
int head;
int tail;
@@ -579,17 +577,15 @@ static int qcom_slim_probe(struct platform_device *pdev)
if (ret)
goto err_rclk_enable_failed;
- ctrl->tx.base = dmam_alloc_coherent(&pdev->dev,
- (ctrl->tx.sl_sz * ctrl->tx.n),
- &ctrl->tx.phy, GFP_KERNEL);
+ ctrl->tx.base = devm_kcalloc(&pdev->dev, ctrl->tx.n, ctrl->tx.sl_sz,
+ GFP_KERNEL);
if (!ctrl->tx.base) {
ret = -ENOMEM;
goto err;
}
- ctrl->rx.base = dmam_alloc_coherent(&pdev->dev,
- (ctrl->rx.sl_sz * ctrl->rx.n),
- &ctrl->rx.phy, GFP_KERNEL);
+ ctrl->rx.base = devm_kcalloc(&pdev->dev,ctrl->rx.n, ctrl->rx.sl_sz,
+ GFP_KERNEL);
if (!ctrl->rx.base) {
ret = -ENOMEM;
goto err;