| .. | .. |
|---|
| 1 | +// SPDX-License-Identifier: GPL-2.0-only |
|---|
| 1 | 2 | /* |
|---|
| 2 | | - * This program is free software; you can redistribute it and/or modify it |
|---|
| 3 | | - * under the terms of the GNU General Public License version 2 as published |
|---|
| 4 | | - * by the Free Software Foundation. |
|---|
| 5 | 3 | * |
|---|
| 6 | 4 | * Copyright (C) 2012 John Crispin <john@phrozen.org> |
|---|
| 7 | 5 | */ |
|---|
| .. | .. |
|---|
| 31 | 29 | dma_addr_t dma; |
|---|
| 32 | 30 | |
|---|
| 33 | 31 | cp1_base = |
|---|
| 34 | | - (void *) CPHYSADDR(dma_alloc_coherent(NULL, CP1_SIZE, |
|---|
| 35 | | - &dma, GFP_ATOMIC)); |
|---|
| 32 | + (void *) CPHYSADDR(dma_alloc_coherent(&pdev->dev, CP1_SIZE, |
|---|
| 33 | + &dma, GFP_KERNEL)); |
|---|
| 36 | 34 | |
|---|
| 37 | 35 | gpio_count = of_gpio_count(pdev->dev.of_node); |
|---|
| 38 | 36 | while (gpio_count > 0) { |
|---|