| .. | .. |
|---|
| 142 | 142 | } |
|---|
| 143 | 143 | |
|---|
| 144 | 144 | int |
|---|
| 145 | | -nvif_notify_fini(struct nvif_notify *notify) |
|---|
| 145 | +nvif_notify_dtor(struct nvif_notify *notify) |
|---|
| 146 | 146 | { |
|---|
| 147 | 147 | struct nvif_object *object = notify->object; |
|---|
| 148 | 148 | struct { |
|---|
| .. | .. |
|---|
| 162 | 162 | } |
|---|
| 163 | 163 | |
|---|
| 164 | 164 | 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) |
|---|
| 168 | 168 | { |
|---|
| 169 | 169 | struct { |
|---|
| 170 | 170 | struct nvif_ioctl_v0 ioctl; |
|---|
| .. | .. |
|---|
| 174 | 174 | int ret = -ENOMEM; |
|---|
| 175 | 175 | |
|---|
| 176 | 176 | notify->object = object; |
|---|
| 177 | + notify->name = name ? name : "nvifNotify"; |
|---|
| 177 | 178 | notify->flags = 0; |
|---|
| 178 | 179 | atomic_set(¬ify->putcnt, 1); |
|---|
| 179 | 180 | notify->func = func; |
|---|
| .. | .. |
|---|
| 204 | 205 | kfree(args); |
|---|
| 205 | 206 | done: |
|---|
| 206 | 207 | if (ret) |
|---|
| 207 | | - nvif_notify_fini(notify); |
|---|
| 208 | + nvif_notify_dtor(notify); |
|---|
| 208 | 209 | return ret; |
|---|
| 209 | 210 | } |
|---|