mirror of https://gitee.com/openkylin/linux.git
drm/nouveau/core/object: pass more args in oclass
The fields were already in struct nvkm_oclass for some reason (probably as an accidental left-over). Preparation for supporting subclients. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
This commit is contained in:
parent
a664869ac4
commit
843faa030c
|
@ -106,9 +106,11 @@ nvkm_ioctl_new(struct nvkm_client *client,
|
|||
|
||||
do {
|
||||
memset(&oclass, 0x00, sizeof(oclass));
|
||||
oclass.client = client;
|
||||
oclass.handle = args->v0.handle;
|
||||
oclass.route = args->v0.route;
|
||||
oclass.token = args->v0.token;
|
||||
oclass.object = args->v0.object;
|
||||
oclass.client = client;
|
||||
oclass.parent = parent;
|
||||
ret = parent->func->sclass(parent, i++, &oclass);
|
||||
if (ret)
|
||||
|
@ -127,9 +129,6 @@ nvkm_ioctl_new(struct nvkm_client *client,
|
|||
ret = nvkm_object_init(object);
|
||||
if (ret == 0) {
|
||||
list_add(&object->head, &parent->tree);
|
||||
object->route = args->v0.route;
|
||||
object->token = args->v0.token;
|
||||
object->object = args->v0.object;
|
||||
if (nvkm_object_insert(object)) {
|
||||
client->data = object;
|
||||
return 0;
|
||||
|
|
|
@ -289,6 +289,9 @@ nvkm_object_ctor(const struct nvkm_object_func *func,
|
|||
object->engine = nvkm_engine_ref(oclass->engine);
|
||||
object->oclass = oclass->base.oclass;
|
||||
object->handle = oclass->handle;
|
||||
object->route = oclass->route;
|
||||
object->token = oclass->token;
|
||||
object->object = oclass->object;
|
||||
INIT_LIST_HEAD(&object->head);
|
||||
INIT_LIST_HEAD(&object->tree);
|
||||
RB_CLEAR_NODE(&object->node);
|
||||
|
|
Loading…
Reference in New Issue