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/gk20a/hal.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'drivers/gpu/nvgpu/gk20a/hal.c') diff --git a/drivers/gpu/nvgpu/gk20a/hal.c b/drivers/gpu/nvgpu/gk20a/hal.c index 8d1a29dd..84b8d819 100644 --- a/drivers/gpu/nvgpu/gk20a/hal.c +++ b/drivers/gpu/nvgpu/gk20a/hal.c @@ -20,13 +20,13 @@ int gpu_init_hal(struct gk20a *g) { u32 ver = g->gpu_characteristics.arch + g->gpu_characteristics.impl; + gk20a_dbg_fn("ver=0x%x", ver); switch (ver) { - case GK20A_GPUID_GK20A: - gk20a_dbg_info("gk20a detected"); - gk20a_init_hal(&g->ops); + case NVGPU_GPUID_GK20A: + if (gk20a_init_hal(&g->ops)) + return -ENODEV; break; - case GK20A_GPUID_GM20B: - gk20a_dbg_info("gm20b detected"); + case NVGPU_GPUID_GM20B: if (gm20b_init_hal(&g->ops)) return -ENODEV; break; -- cgit v1.2.2