aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/brcm2708/patches-4.4/0534-brcmvirt_gpio-Pass-device-structure-into-dma_zalloc_.patch
diff options
context:
space:
mode:
Diffstat (limited to 'target/linux/brcm2708/patches-4.4/0534-brcmvirt_gpio-Pass-device-structure-into-dma_zalloc_.patch')
-rw-r--r--target/linux/brcm2708/patches-4.4/0534-brcmvirt_gpio-Pass-device-structure-into-dma_zalloc_.patch53
1 files changed, 0 insertions, 53 deletions
diff --git a/target/linux/brcm2708/patches-4.4/0534-brcmvirt_gpio-Pass-device-structure-into-dma_zalloc_.patch b/target/linux/brcm2708/patches-4.4/0534-brcmvirt_gpio-Pass-device-structure-into-dma_zalloc_.patch
deleted file mode 100644
index 63eb897882..0000000000
--- a/target/linux/brcm2708/patches-4.4/0534-brcmvirt_gpio-Pass-device-structure-into-dma_zalloc_.patch
+++ /dev/null
@@ -1,53 +0,0 @@
-From c540f39ccf8c43d45d2f0a1604fbc920a65e1084 Mon Sep 17 00:00:00 2001
-From: popcornmix <popcornmix@gmail.com>
-Date: Mon, 14 Nov 2016 17:46:54 +0000
-Subject: [PATCH] brcmvirt_gpio: Pass device structure into dma_zalloc_coherent
-
----
- drivers/gpio/gpio-bcm-virt.c | 9 +++++----
- 1 file changed, 5 insertions(+), 4 deletions(-)
-
---- a/drivers/gpio/gpio-bcm-virt.c
-+++ b/drivers/gpio/gpio-bcm-virt.c
-@@ -102,7 +102,7 @@ static int brcmvirt_gpio_probe(struct pl
- goto out;
- }
-
-- ucb->ts_base = dma_zalloc_coherent(NULL, PAGE_SIZE, &ucb->bus_addr, GFP_KERNEL);
-+ ucb->ts_base = dma_zalloc_coherent(dev, PAGE_SIZE, &ucb->bus_addr, GFP_KERNEL);
- if (!ucb->ts_base) {
- pr_err("[%s]: failed to dma_alloc_coherent(%ld)\n",
- __func__, PAGE_SIZE);
-@@ -116,7 +116,7 @@ static int brcmvirt_gpio_probe(struct pl
-
- if (err || gpiovirtbuf != 0) {
- dev_warn(dev, "Failed to set gpiovirtbuf, trying to get err:%x\n", err);
-- dma_free_coherent(NULL, PAGE_SIZE, ucb->ts_base, ucb->bus_addr);
-+ dma_free_coherent(dev, PAGE_SIZE, ucb->ts_base, ucb->bus_addr);
- ucb->ts_base = 0;
- ucb->bus_addr = 0;
- }
-@@ -168,7 +168,7 @@ static int brcmvirt_gpio_probe(struct pl
- return 0;
- out:
- if (ucb->bus_addr) {
-- dma_free_coherent(NULL, PAGE_SIZE, ucb->ts_base, ucb->bus_addr);
-+ dma_free_coherent(dev, PAGE_SIZE, ucb->ts_base, ucb->bus_addr);
- ucb->bus_addr = 0;
- ucb->ts_base = NULL;
- } else if (ucb->ts_base) {
-@@ -180,12 +180,13 @@ out:
-
- static int brcmvirt_gpio_remove(struct platform_device *pdev)
- {
-+ struct device *dev = &pdev->dev;
- int err = 0;
- struct brcmvirt_gpio *ucb = platform_get_drvdata(pdev);
-
- gpiochip_remove(&ucb->gc);
- if (ucb->bus_addr)
-- dma_free_coherent(NULL, PAGE_SIZE, ucb->ts_base, ucb->bus_addr);
-+ dma_free_coherent(dev, PAGE_SIZE, ucb->ts_base, ucb->bus_addr);
- else if (ucb->ts_base)
- iounmap(ucb->ts_base);
- return err;