aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/etnaviv/etnaviv_gpu.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/gpu/drm/etnaviv/etnaviv_gpu.c')
-rw-r--r--drivers/gpu/drm/etnaviv/etnaviv_gpu.c19
1 files changed, 5 insertions, 14 deletions
diff --git a/drivers/gpu/drm/etnaviv/etnaviv_gpu.c b/drivers/gpu/drm/etnaviv/etnaviv_gpu.c
index 8a88799bf79b..686f6552db48 100644
--- a/drivers/gpu/drm/etnaviv/etnaviv_gpu.c
+++ b/drivers/gpu/drm/etnaviv/etnaviv_gpu.c
@@ -1,17 +1,6 @@
1// SPDX-License-Identifier: GPL-2.0
1/* 2/*
2 * Copyright (C) 2015 Etnaviv Project 3 * Copyright (C) 2015-2018 Etnaviv Project
3 *
4 * This program is free software; you can redistribute it and/or modify it
5 * under the terms of the GNU General Public License version 2 as published by
6 * the Free Software Foundation.
7 *
8 * This program is distributed in the hope that it will be useful, but WITHOUT
9 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
10 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
11 * more details.
12 *
13 * You should have received a copy of the GNU General Public License along with
14 * this program. If not, see <http://www.gnu.org/licenses/>.
15 */ 4 */
16 5
17#include <linux/component.h> 6#include <linux/component.h>
@@ -1735,6 +1724,7 @@ static int etnaviv_gpu_platform_probe(struct platform_device *pdev)
1735{ 1724{
1736 struct device *dev = &pdev->dev; 1725 struct device *dev = &pdev->dev;
1737 struct etnaviv_gpu *gpu; 1726 struct etnaviv_gpu *gpu;
1727 struct resource *res;
1738 int err; 1728 int err;
1739 1729
1740 gpu = devm_kzalloc(dev, sizeof(*gpu), GFP_KERNEL); 1730 gpu = devm_kzalloc(dev, sizeof(*gpu), GFP_KERNEL);
@@ -1746,7 +1736,8 @@ static int etnaviv_gpu_platform_probe(struct platform_device *pdev)
1746 mutex_init(&gpu->fence_idr_lock); 1736 mutex_init(&gpu->fence_idr_lock);
1747 1737
1748 /* Map registers: */ 1738 /* Map registers: */
1749 gpu->mmio = etnaviv_ioremap(pdev, NULL, dev_name(gpu->dev)); 1739 res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
1740 gpu->mmio = devm_ioremap_resource(&pdev->dev, res);
1750 if (IS_ERR(gpu->mmio)) 1741 if (IS_ERR(gpu->mmio))
1751 return PTR_ERR(gpu->mmio); 1742 return PTR_ERR(gpu->mmio);
1752 1743