From 2d5ff668cbc6a932df2c9cf79627d1d340e5c2c0 Mon Sep 17 00:00:00 2001 From: Terje Bergstrom Date: Mon, 27 Oct 2014 11:06:59 +0200 Subject: gpu: nvgpu: GR and LTC HAL to use const structs Convert GR and LTC HALs to use const structs, and initialize them with macros. Bug 1567274 Change-Id: Ia3f24a5eccb27578d9cba69755f636818d11275c Signed-off-by: Terje Bergstrom Reviewed-on: http://git-master/r/590371 --- drivers/gpu/nvgpu/vgpu/ltc_vgpu.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'drivers/gpu/nvgpu/vgpu/ltc_vgpu.c') diff --git a/drivers/gpu/nvgpu/vgpu/ltc_vgpu.c b/drivers/gpu/nvgpu/vgpu/ltc_vgpu.c index ddff23b7..0a7d19c4 100644 --- a/drivers/gpu/nvgpu/vgpu/ltc_vgpu.c +++ b/drivers/gpu/nvgpu/vgpu/ltc_vgpu.c @@ -48,8 +48,12 @@ static int vgpu_ltc_init_comptags(struct gk20a *g, struct gr_gk20a *gr) return 0; } +static const struct gpu_ltc_ops vgpu_ltc_ops = { + .determine_L2_size_bytes = vgpu_determine_L2_size_bytes, + .init_comptags = vgpu_ltc_init_comptags, +}; + void vgpu_init_ltc_ops(struct gpu_ops *gops) { - gops->ltc.determine_L2_size_bytes = vgpu_determine_L2_size_bytes; - gops->ltc.init_comptags = vgpu_ltc_init_comptags; + gops->ltc = &vgpu_ltc_ops; } -- cgit v1.2.2