diff options
author | Terje Bergstrom <tbergstrom@nvidia.com> | 2016-03-29 19:02:34 -0400 |
---|---|---|
committer | Terje Bergstrom <tbergstrom@nvidia.com> | 2016-04-08 12:42:41 -0400 |
commit | e8bac374c0ed24f05bf389e1e8b5aca47f61bd3a (patch) | |
tree | 36b6e111f8706c0560ee552bc9d6e15b87fc9621 /drivers/gpu/nvgpu/gk20a/platform_vgpu_tegra.c | |
parent | 2382a8433fddaee3baecff6ae941944850787ab7 (diff) |
gpu: nvgpu: Use device instead of platform_device
Use struct device instead of struct platform_device wherever
possible. This allows adding other bus types later.
Change-Id: I1657287a68d85a542cdbdd8a00d1902c3d6e00ed
Signed-off-by: Terje Bergstrom <tbergstrom@nvidia.com>
Reviewed-on: http://git-master/r/1120466
Diffstat (limited to 'drivers/gpu/nvgpu/gk20a/platform_vgpu_tegra.c')
-rw-r--r-- | drivers/gpu/nvgpu/gk20a/platform_vgpu_tegra.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/drivers/gpu/nvgpu/gk20a/platform_vgpu_tegra.c b/drivers/gpu/nvgpu/gk20a/platform_vgpu_tegra.c index ed65756a..bb8d05b8 100644 --- a/drivers/gpu/nvgpu/gk20a/platform_vgpu_tegra.c +++ b/drivers/gpu/nvgpu/gk20a/platform_vgpu_tegra.c | |||
@@ -1,7 +1,7 @@ | |||
1 | /* | 1 | /* |
2 | * Tegra Virtualized GPU Platform Interface | 2 | * Tegra Virtualized GPU Platform Interface |
3 | * | 3 | * |
4 | * Copyright (c) 2014, NVIDIA CORPORATION. All rights reserved. | 4 | * Copyright (c) 2014-2016, NVIDIA CORPORATION. All rights reserved. |
5 | * | 5 | * |
6 | * This program is free software; you can redistribute it and/or modify it | 6 | * This program is free software; you can redistribute it and/or modify it |
7 | * under the terms and conditions of the GNU General Public License, | 7 | * under the terms and conditions of the GNU General Public License, |
@@ -19,10 +19,10 @@ | |||
19 | #include "hal_gk20a.h" | 19 | #include "hal_gk20a.h" |
20 | #include "platform_gk20a.h" | 20 | #include "platform_gk20a.h" |
21 | 21 | ||
22 | static int gk20a_tegra_probe(struct platform_device *dev) | 22 | static int gk20a_tegra_probe(struct device *dev) |
23 | { | 23 | { |
24 | struct gk20a_platform *platform = gk20a_get_platform(dev); | 24 | struct gk20a_platform *platform = dev_get_drvdata(dev); |
25 | struct device_node *np = dev->dev.of_node; | 25 | struct device_node *np = dev->of_node; |
26 | const __be32 *host1x_ptr; | 26 | const __be32 *host1x_ptr; |
27 | struct platform_device *host1x_pdev = NULL; | 27 | struct platform_device *host1x_pdev = NULL; |
28 | 28 | ||
@@ -33,13 +33,13 @@ static int gk20a_tegra_probe(struct platform_device *dev) | |||
33 | 33 | ||
34 | host1x_pdev = of_find_device_by_node(host1x_node); | 34 | host1x_pdev = of_find_device_by_node(host1x_node); |
35 | if (!host1x_pdev) { | 35 | if (!host1x_pdev) { |
36 | dev_warn(&dev->dev, "host1x device not available"); | 36 | dev_warn(dev, "host1x device not available"); |
37 | return -EPROBE_DEFER; | 37 | return -EPROBE_DEFER; |
38 | } | 38 | } |
39 | 39 | ||
40 | } else { | 40 | } else { |
41 | host1x_pdev = to_platform_device(dev->dev.parent); | 41 | host1x_pdev = to_platform_device(dev->parent); |
42 | dev_warn(&dev->dev, "host1x reference not found. assuming host1x to be parent"); | 42 | dev_warn(dev, "host1x reference not found. assuming host1x to be parent"); |
43 | } | 43 | } |
44 | 44 | ||
45 | platform->g->host1x_dev = host1x_pdev; | 45 | platform->g->host1x_dev = host1x_pdev; |