drm/nouveau/i2c: fix some blatant abuse
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
This commit is contained in:
Родитель
8d90d1ef88
Коммит
95fb6dd728
|
@ -494,8 +494,8 @@ nouveau_i2c_create_port(struct nouveau_i2c *i2c, int index, u8 type,
|
||||||
oclass = impl->pad_x;
|
oclass = impl->pad_x;
|
||||||
}
|
}
|
||||||
|
|
||||||
ret = nouveau_object_ctor(NULL, nv_object(i2c), oclass, NULL, pad,
|
ret = nouveau_object_ctor(nv_object(i2c), nv_object(i2c), oclass,
|
||||||
&parent);
|
NULL, pad, &parent);
|
||||||
if (ret < 0)
|
if (ret < 0)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
|
|
@ -14,7 +14,7 @@ static inline struct nvkm_i2c_pad *
|
||||||
nvkm_i2c_pad(struct nouveau_i2c_port *port)
|
nvkm_i2c_pad(struct nouveau_i2c_port *port)
|
||||||
{
|
{
|
||||||
struct nouveau_object *pad = nv_object(port);
|
struct nouveau_object *pad = nv_object(port);
|
||||||
while (pad->parent)
|
while (!nv_iclass(pad->parent, NV_SUBDEV_CLASS))
|
||||||
pad = pad->parent;
|
pad = pad->parent;
|
||||||
return (void *)pad;
|
return (void *)pad;
|
||||||
}
|
}
|
||||||
|
|
Загрузка…
Ссылка в новой задаче