From 808d6efdeb361bd51c1afa2115db0e5f4fe6609d Mon Sep 17 00:00:00 2001 From: Alexandre Courbot Date: Wed, 14 Dec 2016 17:02:35 +0900 Subject: [PATCH] drm/nouveau/secboot: rename init() hook to oneinit() The init() hook is called by the subdev's oneinit(). Rename it accordingly to avoid confusion about the lifetime of objects allocated in it. Signed-off-by: Alexandre Courbot Signed-off-by: Ben Skeggs --- drivers/gpu/drm/nouveau/nvkm/subdev/secboot/base.c | 4 ++-- drivers/gpu/drm/nouveau/nvkm/subdev/secboot/gm200.c | 4 ++-- drivers/gpu/drm/nouveau/nvkm/subdev/secboot/gm20b.c | 6 +++--- drivers/gpu/drm/nouveau/nvkm/subdev/secboot/priv.h | 4 ++-- 4 files changed, 9 insertions(+), 9 deletions(-) diff --git a/drivers/gpu/drm/nouveau/nvkm/subdev/secboot/base.c b/drivers/gpu/drm/nouveau/nvkm/subdev/secboot/base.c index f423a1c1ae29..525740edaf75 100644 --- a/drivers/gpu/drm/nouveau/nvkm/subdev/secboot/base.c +++ b/drivers/gpu/drm/nouveau/nvkm/subdev/secboot/base.c @@ -78,8 +78,8 @@ nvkm_secboot_oneinit(struct nvkm_subdev *subdev) } /* Call chip-specific init function */ - if (sb->func->init) - ret = sb->func->init(sb); + if (sb->func->oneinit) + ret = sb->func->oneinit(sb); if (ret) { nvkm_error(subdev, "Secure Boot initialization failed: %d\n", ret); diff --git a/drivers/gpu/drm/nouveau/nvkm/subdev/secboot/gm200.c b/drivers/gpu/drm/nouveau/nvkm/subdev/secboot/gm200.c index 6f99cf2d27cd..98d18eccbb6f 100644 --- a/drivers/gpu/drm/nouveau/nvkm/subdev/secboot/gm200.c +++ b/drivers/gpu/drm/nouveau/nvkm/subdev/secboot/gm200.c @@ -1253,7 +1253,7 @@ end: } int -gm200_secboot_init(struct nvkm_secboot *sb) +gm200_secboot_oneinit(struct nvkm_secboot *sb) { struct gm200_secboot *gsb = gm200_secboot(sb); struct nvkm_device *device = sb->subdev.device; @@ -1332,7 +1332,7 @@ gm200_secboot_dtor(struct nvkm_secboot *sb) static const struct nvkm_secboot_func gm200_secboot = { .dtor = gm200_secboot_dtor, - .init = gm200_secboot_init, + .oneinit = gm200_secboot_oneinit, .fini = gm200_secboot_fini, .reset = gm200_secboot_reset, .managed_falcons = BIT(NVKM_SECBOOT_FALCON_FECS) | diff --git a/drivers/gpu/drm/nouveau/nvkm/subdev/secboot/gm20b.c b/drivers/gpu/drm/nouveau/nvkm/subdev/secboot/gm20b.c index 50f503b5d1ce..c08eb775d3a6 100644 --- a/drivers/gpu/drm/nouveau/nvkm/subdev/secboot/gm20b.c +++ b/drivers/gpu/drm/nouveau/nvkm/subdev/secboot/gm20b.c @@ -174,7 +174,7 @@ gm20b_tegra_read_wpr(struct gm200_secboot *gsb) #endif static int -gm20b_secboot_init(struct nvkm_secboot *sb) +gm20b_secboot_oneinit(struct nvkm_secboot *sb) { struct gm200_secboot *gsb = gm200_secboot(sb); int ret; @@ -183,13 +183,13 @@ gm20b_secboot_init(struct nvkm_secboot *sb) if (ret) return ret; - return gm200_secboot_init(sb); + return gm200_secboot_oneinit(sb); } static const struct nvkm_secboot_func gm20b_secboot = { .dtor = gm200_secboot_dtor, - .init = gm20b_secboot_init, + .oneinit = gm20b_secboot_oneinit, .reset = gm200_secboot_reset, .managed_falcons = BIT(NVKM_SECBOOT_FALCON_FECS), .boot_falcon = NVKM_SECBOOT_FALCON_PMU, diff --git a/drivers/gpu/drm/nouveau/nvkm/subdev/secboot/priv.h b/drivers/gpu/drm/nouveau/nvkm/subdev/secboot/priv.h index d23c94c8e597..393b945f3d8d 100644 --- a/drivers/gpu/drm/nouveau/nvkm/subdev/secboot/priv.h +++ b/drivers/gpu/drm/nouveau/nvkm/subdev/secboot/priv.h @@ -27,7 +27,7 @@ #include struct nvkm_secboot_func { - int (*init)(struct nvkm_secboot *); + int (*oneinit)(struct nvkm_secboot *); int (*fini)(struct nvkm_secboot *, bool suspend); void *(*dtor)(struct nvkm_secboot *); int (*reset)(struct nvkm_secboot *, enum nvkm_secboot_falcon); @@ -221,7 +221,7 @@ struct gm200_secboot_func { int (*prepare_blobs)(struct gm200_secboot *); }; -int gm200_secboot_init(struct nvkm_secboot *); +int gm200_secboot_oneinit(struct nvkm_secboot *); void *gm200_secboot_dtor(struct nvkm_secboot *); int gm200_secboot_reset(struct nvkm_secboot *, enum nvkm_secboot_falcon); int gm200_secboot_start(struct nvkm_secboot *, enum nvkm_secboot_falcon); -- 2.20.1