1 From cc96288e1ec40a79c16949fabbcfc3c857797c59 Mon Sep 17 00:00:00 2001
2 From: popcornmix <popcornmix@gmail.com>
3 Date: Mon, 14 Nov 2016 20:14:21 +0000
4 Subject: [PATCH] rpi-ft5406: Pass device structure into dma_zalloc_coherent
7 drivers/input/touchscreen/rpi-ft5406.c | 6 +++---
8 1 file changed, 3 insertions(+), 3 deletions(-)
10 --- a/drivers/input/touchscreen/rpi-ft5406.c
11 +++ b/drivers/input/touchscreen/rpi-ft5406.c
12 @@ -151,7 +151,7 @@ static int ft5406_probe(struct platform_
16 - ts->ts_base = dma_zalloc_coherent(NULL, PAGE_SIZE, &ts->bus_addr, GFP_KERNEL);
17 + ts->ts_base = dma_zalloc_coherent(dev, PAGE_SIZE, &ts->bus_addr, GFP_KERNEL);
19 pr_err("[%s]: failed to dma_alloc_coherent(%ld)\n",
21 @@ -165,7 +165,7 @@ static int ft5406_probe(struct platform_
23 if (err || touchbuf != 0) {
24 dev_warn(dev, "Failed to set touchbuf, trying to get err:%x\n", err);
25 - dma_free_coherent(NULL, PAGE_SIZE, ts->ts_base, ts->bus_addr);
26 + dma_free_coherent(dev, PAGE_SIZE, ts->ts_base, ts->bus_addr);
30 @@ -238,7 +238,7 @@ static int ft5406_probe(struct platform_
34 - dma_free_coherent(NULL, PAGE_SIZE, ts->ts_base, ts->bus_addr);
35 + dma_free_coherent(dev, PAGE_SIZE, ts->ts_base, ts->bus_addr);
38 } else if (ts->ts_base) {