diff options
author | Terje Bergstrom <tbergstrom@nvidia.com> | 2017-03-24 13:55:46 -0400 |
---|---|---|
committer | mobile promotions <svcmobile_promotions@nvidia.com> | 2017-03-28 15:05:03 -0400 |
commit | 3e39798997f0726472e18a17462216094c084074 (patch) | |
tree | cf68b3fff464c1217fa28ec27f6c612d5cfc66fb /drivers/gpu/nvgpu/gk20a/gk20a.c | |
parent | 580c8112f08281332cefea16243fcfbf27cd6bdd (diff) |
gpu: nvgpu: Remove unnecessary use of dev_name()
Move the name field from struct gpu_ops up to struct gk20a. The field
is not a function op, so it doesn't belong in gpu_ops.
Replace all uses of dev_name() with use of g->name when possible.
JIRA NVGPU-16
Change-Id: Ic6e99e39258cbf3bb7c806962cbbd7de5126688f
Signed-off-by: Terje Bergstrom <tbergstrom@nvidia.com>
Reviewed-on: http://git-master/r/1328534
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Diffstat (limited to 'drivers/gpu/nvgpu/gk20a/gk20a.c')
-rw-r--r-- | drivers/gpu/nvgpu/gk20a/gk20a.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/drivers/gpu/nvgpu/gk20a/gk20a.c b/drivers/gpu/nvgpu/gk20a/gk20a.c index b715e661..0495e9d1 100644 --- a/drivers/gpu/nvgpu/gk20a/gk20a.c +++ b/drivers/gpu/nvgpu/gk20a/gk20a.c | |||
@@ -500,7 +500,7 @@ int gk20a_pm_finalize_poweron(struct device *dev) | |||
500 | if (g->power_on) | 500 | if (g->power_on) |
501 | return 0; | 501 | return 0; |
502 | 502 | ||
503 | trace_gk20a_finalize_poweron(dev_name(dev)); | 503 | trace_gk20a_finalize_poweron(g->name); |
504 | 504 | ||
505 | /* Increment platform power refcount */ | 505 | /* Increment platform power refcount */ |
506 | if (platform->busy) { | 506 | if (platform->busy) { |
@@ -687,7 +687,7 @@ int gk20a_pm_finalize_poweron(struct device *dev) | |||
687 | 687 | ||
688 | gk20a_scale_resume(dev); | 688 | gk20a_scale_resume(dev); |
689 | 689 | ||
690 | trace_gk20a_finalize_poweron_done(dev_name(dev)); | 690 | trace_gk20a_finalize_poweron_done(g->name); |
691 | 691 | ||
692 | if (platform->has_cde) | 692 | if (platform->has_cde) |
693 | gk20a_init_cde_support(g); | 693 | gk20a_init_cde_support(g); |
@@ -793,8 +793,8 @@ static int gk20a_create_device( | |||
793 | if (IS_ERR(subdev)) { | 793 | if (IS_ERR(subdev)) { |
794 | err = PTR_ERR(dev); | 794 | err = PTR_ERR(dev); |
795 | cdev_del(cdev); | 795 | cdev_del(cdev); |
796 | dev_err(dev, "failed to create %s device for %s\n", | 796 | dev_err(dev, "failed to create %s device\n", |
797 | cdev_name, dev_name(dev)); | 797 | cdev_name); |
798 | return err; | 798 | return err; |
799 | } | 799 | } |
800 | 800 | ||
@@ -971,7 +971,7 @@ static int gk20a_pm_unrailgate(struct device *dev) | |||
971 | g->pstats.railgating_cycle_count++; | 971 | g->pstats.railgating_cycle_count++; |
972 | #endif | 972 | #endif |
973 | 973 | ||
974 | trace_gk20a_pm_unrailgate(dev_name(dev)); | 974 | trace_gk20a_pm_unrailgate(g->name); |
975 | 975 | ||
976 | if (platform->unrailgate) { | 976 | if (platform->unrailgate) { |
977 | nvgpu_mutex_acquire(&platform->railgate_lock); | 977 | nvgpu_mutex_acquire(&platform->railgate_lock); |
@@ -1765,7 +1765,7 @@ int gk20a_init_gpu_characteristics(struct gk20a *g) | |||
1765 | gpu->event_ioctl_nr_last = NVGPU_EVENT_IOCTL_LAST; | 1765 | gpu->event_ioctl_nr_last = NVGPU_EVENT_IOCTL_LAST; |
1766 | gpu->gpu_va_bit_count = 40; | 1766 | gpu->gpu_va_bit_count = 40; |
1767 | 1767 | ||
1768 | strlcpy(gpu->chipname, g->ops.name, sizeof(gpu->chipname)); | 1768 | strlcpy(gpu->chipname, g->name, sizeof(gpu->chipname)); |
1769 | gpu->max_fbps_count = g->ops.gr.get_max_fbps_count(g); | 1769 | gpu->max_fbps_count = g->ops.gr.get_max_fbps_count(g); |
1770 | gpu->fbp_en_mask = g->ops.gr.get_fbp_en_mask(g); | 1770 | gpu->fbp_en_mask = g->ops.gr.get_fbp_en_mask(g); |
1771 | gpu->max_ltc_per_fbp = g->ops.gr.get_max_ltc_per_fbp(g); | 1771 | gpu->max_ltc_per_fbp = g->ops.gr.get_max_ltc_per_fbp(g); |