diff options
author | Takashi Iwai <tiwai@suse.de> | 2020-09-09 18:26:07 +0200 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2020-09-09 18:26:48 +0200 |
commit | 9ddb236f13594b34a12dacf69a5adca7a1aef35e (patch) | |
tree | 1dc1f6e54962a2e3ad3d56c894522cb4b1ddce93 /drivers/gpu/drm/nouveau/nvif/object.c | |
parent | ALSA: vx: vx_pcm: remove redundant assignment (diff) | |
parent | ALSA: hda/realtek - The Mic on a RedmiBook doesn't work (diff) | |
download | linux-dev-9ddb236f13594b34a12dacf69a5adca7a1aef35e.tar.xz linux-dev-9ddb236f13594b34a12dacf69a5adca7a1aef35e.zip |
Merge branch 'for-linus' into for-next
Back-merge to apply the tasklet conversion patches that are based
on the already applied tasklet API changes on 5.9-rc4.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'drivers/gpu/drm/nouveau/nvif/object.c')
-rw-r--r-- | drivers/gpu/drm/nouveau/nvif/object.c | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/drivers/gpu/drm/nouveau/nvif/object.c b/drivers/gpu/drm/nouveau/nvif/object.c index ef3f62840e83..671a5c0199e0 100644 --- a/drivers/gpu/drm/nouveau/nvif/object.c +++ b/drivers/gpu/drm/nouveau/nvif/object.c @@ -242,7 +242,7 @@ nvif_object_map(struct nvif_object *object, void *argv, u32 argc) } void -nvif_object_fini(struct nvif_object *object) +nvif_object_dtor(struct nvif_object *object) { struct { struct nvif_ioctl_v0 ioctl; @@ -260,8 +260,8 @@ nvif_object_fini(struct nvif_object *object) } int -nvif_object_init(struct nvif_object *parent, u32 handle, s32 oclass, - void *data, u32 size, struct nvif_object *object) +nvif_object_ctor(struct nvif_object *parent, const char *name, u32 handle, + s32 oclass, void *data, u32 size, struct nvif_object *object) { struct { struct nvif_ioctl_v0 ioctl; @@ -270,6 +270,7 @@ nvif_object_init(struct nvif_object *parent, u32 handle, s32 oclass, int ret = 0; object->client = NULL; + object->name = name ? name : "nvifObject"; object->handle = handle; object->oclass = oclass; object->map.ptr = NULL; @@ -277,10 +278,12 @@ nvif_object_init(struct nvif_object *parent, u32 handle, s32 oclass, if (parent) { if (!(args = kmalloc(sizeof(*args) + size, GFP_KERNEL))) { - nvif_object_fini(object); + nvif_object_dtor(object); return -ENOMEM; } + object->parent = parent->parent; + args->ioctl.version = 0; args->ioctl.type = NVIF_IOCTL_V0_NEW; args->new.version = 0; @@ -300,6 +303,6 @@ nvif_object_init(struct nvif_object *parent, u32 handle, s32 oclass, } if (ret) - nvif_object_fini(object); + nvif_object_dtor(object); return ret; } |