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 <acour...@nvidia.com>
---
 drm/nouveau/nvkm/subdev/secboot/base.c  | 4 ++--
 drm/nouveau/nvkm/subdev/secboot/gm200.c | 4 ++--
 drm/nouveau/nvkm/subdev/secboot/gm20b.c | 6 +++---
 drm/nouveau/nvkm/subdev/secboot/priv.h  | 4 ++--
 4 files changed, 9 insertions(+), 9 deletions(-)

diff --git a/drm/nouveau/nvkm/subdev/secboot/base.c 
b/drm/nouveau/nvkm/subdev/secboot/base.c
index 6b3346ff0253..ea36851358ea 100644
--- a/drm/nouveau/nvkm/subdev/secboot/base.c
+++ b/drm/nouveau/nvkm/subdev/secboot/base.c
@@ -196,8 +196,8 @@ nvkm_secboot_oneinit(struct nvkm_subdev *subdev)
        int ret = 0;
 
        /* 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/drm/nouveau/nvkm/subdev/secboot/gm200.c 
b/drm/nouveau/nvkm/subdev/secboot/gm200.c
index 8067d29f526f..b020e41d2391 100644
--- a/drm/nouveau/nvkm/subdev/secboot/gm200.c
+++ b/drm/nouveau/nvkm/subdev/secboot/gm200.c
@@ -1305,7 +1305,7 @@ gm200_secboot_start(struct nvkm_secboot *sb, enum 
nvkm_falconidx falcon)
 
 
 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;
@@ -1384,7 +1384,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,
        .start = gm200_secboot_start,
diff --git a/drm/nouveau/nvkm/subdev/secboot/gm20b.c 
b/drm/nouveau/nvkm/subdev/secboot/gm20b.c
index 66a1d01f45ce..1cb663c31e17 100644
--- a/drm/nouveau/nvkm/subdev/secboot/gm20b.c
+++ b/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,
        .start = gm200_secboot_start,
        .managed_falcons = BIT(NVKM_FALCON_FECS),
diff --git a/drm/nouveau/nvkm/subdev/secboot/priv.h 
b/drm/nouveau/nvkm/subdev/secboot/priv.h
index b1ef3d1b4c9d..baa802b1e9d2 100644
--- a/drm/nouveau/nvkm/subdev/secboot/priv.h
+++ b/drm/nouveau/nvkm/subdev/secboot/priv.h
@@ -27,7 +27,7 @@
 #include <subdev/mmu.h>
 
 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_falconidx);
@@ -224,7 +224,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 *, u32);
 int gm200_secboot_start(struct nvkm_secboot *, u32);
-- 
2.10.0

_______________________________________________
Nouveau mailing list
Nouveau@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/nouveau

Reply via email to