forked from ~ljy/RK356X_SDK_RELEASE

hc
2023-12-11 6778948f9de86c3cfaf36725a7c87dcff9ba247f
kernel/drivers/gpu/drm/nouveau/nvif/notify.c
....@@ -142,7 +142,7 @@
142142 }
143143
144144 int
145
-nvif_notify_fini(struct nvif_notify *notify)
145
+nvif_notify_dtor(struct nvif_notify *notify)
146146 {
147147 struct nvif_object *object = notify->object;
148148 struct {
....@@ -162,9 +162,9 @@
162162 }
163163
164164 int
165
-nvif_notify_init(struct nvif_object *object, int (*func)(struct nvif_notify *),
166
- bool work, u8 event, void *data, u32 size, u32 reply,
167
- struct nvif_notify *notify)
165
+nvif_notify_ctor(struct nvif_object *object, const char *name,
166
+ int (*func)(struct nvif_notify *), bool work, u8 event,
167
+ void *data, u32 size, u32 reply, struct nvif_notify *notify)
168168 {
169169 struct {
170170 struct nvif_ioctl_v0 ioctl;
....@@ -174,6 +174,7 @@
174174 int ret = -ENOMEM;
175175
176176 notify->object = object;
177
+ notify->name = name ? name : "nvifNotify";
177178 notify->flags = 0;
178179 atomic_set(&notify->putcnt, 1);
179180 notify->func = func;
....@@ -204,6 +205,6 @@
204205 kfree(args);
205206 done:
206207 if (ret)
207
- nvif_notify_fini(notify);
208
+ nvif_notify_dtor(notify);
208209 return ret;
209210 }