gpu: nvgpu: sec2: update sec2 API

Remove the second parameter for the nvgpu_init_sec2_setup_sw()
function so the function only requires the gk20a object. The
g->sec2 was always passed for this parameter. And this makes the
API signature match the other init functions in the driver.

JIRA NVGPU-3980

Change-Id: I22f526d961da44da64d563f5f3136c62cf9f4adf
Signed-off-by: Philip Elcan <pelcan@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/2202970
Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com>
Reviewed-by: svc-mobile-misra <svc-mobile-misra@nvidia.com>
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Vinod Gopalakrishnakurup <vinodg@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
This commit is contained in:
Philip Elcan
2019-09-19 16:24:13 -04:00
committed by Alex Waterman
parent 19dd64930d
commit a877192641
4 changed files with 9 additions and 10 deletions

View File

@@ -38,24 +38,24 @@ static void nvgpu_remove_sec2_support(struct nvgpu_sec2 *sec2)
nvgpu_mutex_destroy(&sec2->isr_mutex);
}
int nvgpu_init_sec2_setup_sw(struct gk20a *g, struct nvgpu_sec2 *sec2)
int nvgpu_init_sec2_setup_sw(struct gk20a *g)
{
int err = 0;
nvgpu_log_fn(g, " ");
sec2->g = g;
g->sec2.g = g;
err = nvgpu_sec2_sequences_alloc(g, &sec2->sequences);
err = nvgpu_sec2_sequences_alloc(g, &g->sec2.sequences);
if (err != 0) {
return err;
}
nvgpu_sec2_sequences_init(g, &sec2->sequences);
nvgpu_sec2_sequences_init(g, &g->sec2.sequences);
nvgpu_mutex_init(&sec2->isr_mutex);
nvgpu_mutex_init(&g->sec2.isr_mutex);
sec2->remove_support = nvgpu_remove_sec2_support;
g->sec2.remove_support = nvgpu_remove_sec2_support;
return err;
}