u64 version;
};
-int nvif_client_ctor(struct nvif_client *parent, const char *name, u64 device,
- struct nvif_client *);
+int nvif_client_ctor(struct nvif_client *parent, const char *name, struct nvif_client *);
void nvif_client_dtor(struct nvif_client *);
int nvif_client_ioctl(struct nvif_client *, void *, u32);
int nvif_client_suspend(struct nvif_client *);
struct nvif_client_v0 {
__u8 version;
__u8 pad01[7];
- __u64 device;
char name[32];
};
{ NVIF_CLASS_VMM_NV04 , -1 },
{}
};
- u64 device = nouveau_name(drm->dev);
int ret;
snprintf(cli->name, sizeof(cli->name), "%s", sname);
if (cli != &drm->master) {
mutex_lock(&drm->master.lock);
- ret = nvif_client_ctor(&drm->master.base, cli->name, device,
- &cli->base);
+ ret = nvif_client_ctor(&drm->master.base, cli->name, &cli->base);
mutex_unlock(&drm->master.lock);
}
if (ret) {
}
int
-nvif_client_ctor(struct nvif_client *parent, const char *name, u64 device,
- struct nvif_client *client)
+nvif_client_ctor(struct nvif_client *parent, const char *name, struct nvif_client *client)
{
- struct nvif_client_v0 args = { .device = device };
+ struct nvif_client_v0 args = {};
struct {
struct nvif_ioctl_v0 ioctl;
struct nvif_ioctl_nop_v0 nop;
if (ret)
return ret;
- return nvif_client_ctor(client, name, device, client);
+ return nvif_client_ctor(client, name, client);
}
if (!(ret = nvif_unpack(ret, &argv, &argc, args->v0, 0, 0, false))){
args->v0.name[sizeof(args->v0.name) - 1] = 0;
- ret = nvkm_client_new(args->v0.name, args->v0.device, NULL,
+ ret = nvkm_client_new(args->v0.name, oclass->client->device, NULL,
NULL, oclass->client->event, &client);
if (ret)
return ret;