diff options
author | Richard Zhao <rizhao@nvidia.com> | 2018-01-29 19:15:58 -0500 |
---|---|---|
committer | mobile promotions <svcmobile_promotions@nvidia.com> | 2018-02-27 17:30:20 -0500 |
commit | 0e39ad429e8aa68cd11e464cd76a8b9d1912fb7d (patch) | |
tree | f0e0e5b082d59333aea7276375b1b1c15f05b0c4 /drivers/gpu/nvgpu/common/linux/vgpu/vgpu.h | |
parent | 26f22226bad5b31ec57938bad17cc1e1c1d60343 (diff) |
gpu: nvgpu: vgpu: move to nvgpu_err/info from dev_err/info
It helps code be more portable.
Jira EVLR-2364
Change-Id: I0cc1fa739d7884d3c863975f08b3b592acd34613
Signed-off-by: Richard Zhao <rizhao@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/1649941
Reviewed-by: Aingara Paramakuru <aparamakuru@nvidia.com>
Reviewed-by: Terje Bergstrom <tbergstrom@nvidia.com>
GVS: Gerrit_Virtual_Submit
Reviewed-by: Nirav Patel <nipatel@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Diffstat (limited to 'drivers/gpu/nvgpu/common/linux/vgpu/vgpu.h')
-rw-r--r-- | drivers/gpu/nvgpu/common/linux/vgpu/vgpu.h | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/drivers/gpu/nvgpu/common/linux/vgpu/vgpu.h b/drivers/gpu/nvgpu/common/linux/vgpu/vgpu.h index e9a73baf..be999930 100644 --- a/drivers/gpu/nvgpu/common/linux/vgpu/vgpu.h +++ b/drivers/gpu/nvgpu/common/linux/vgpu/vgpu.h | |||
@@ -53,23 +53,18 @@ static inline struct vgpu_priv_data *vgpu_get_priv_data(struct gk20a *g) | |||
53 | return vgpu_get_priv_data_from_dev(dev_from_gk20a(g)); | 53 | return vgpu_get_priv_data_from_dev(dev_from_gk20a(g)); |
54 | } | 54 | } |
55 | 55 | ||
56 | static inline u64 vgpu_get_handle_from_dev(struct device *dev) | 56 | static inline u64 vgpu_get_handle(struct gk20a *g) |
57 | { | 57 | { |
58 | struct vgpu_priv_data *priv = vgpu_get_priv_data_from_dev(dev); | 58 | struct vgpu_priv_data *priv = vgpu_get_priv_data(g); |
59 | 59 | ||
60 | if (unlikely(!priv)) { | 60 | if (unlikely(!priv)) { |
61 | dev_err(dev, "invalid vgpu_priv_data in %s\n", __func__); | 61 | nvgpu_err(g, "invalid vgpu_priv_data in %s", __func__); |
62 | return INT_MAX; | 62 | return INT_MAX; |
63 | } | 63 | } |
64 | 64 | ||
65 | return priv->virt_handle; | 65 | return priv->virt_handle; |
66 | } | 66 | } |
67 | 67 | ||
68 | static inline u64 vgpu_get_handle(struct gk20a *g) | ||
69 | { | ||
70 | return vgpu_get_handle_from_dev(dev_from_gk20a(g)); | ||
71 | } | ||
72 | |||
73 | int vgpu_pm_prepare_poweroff(struct device *dev); | 68 | int vgpu_pm_prepare_poweroff(struct device *dev); |
74 | int vgpu_pm_finalize_poweron(struct device *dev); | 69 | int vgpu_pm_finalize_poweron(struct device *dev); |
75 | int vgpu_probe(struct platform_device *dev); | 70 | int vgpu_probe(struct platform_device *dev); |