diff options
author | Ben Skeggs <bskeggs@redhat.com> | 2014-12-03 18:47:09 +1000 |
---|---|---|
committer | Ben Skeggs <bskeggs@redhat.com> | 2015-01-22 12:14:45 +1000 |
commit | 95fb6dd72850cb8dd6262aeae3d12fc867dc0b7b (patch) | |
tree | 07d2caa0cbd6ee1f6e5ec11fdd28cb94b92f2911 /drivers/gpu/drm/nouveau | |
parent | 8d90d1ef88ddad5353888e9ecf1d30c75a5effff (diff) | |
download | blackbird-op-linux-95fb6dd72850cb8dd6262aeae3d12fc867dc0b7b.tar.gz blackbird-op-linux-95fb6dd72850cb8dd6262aeae3d12fc867dc0b7b.zip |
drm/nouveau/i2c: fix some blatant abuse
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Diffstat (limited to 'drivers/gpu/drm/nouveau')
-rw-r--r-- | drivers/gpu/drm/nouveau/core/subdev/i2c/base.c | 4 | ||||
-rw-r--r-- | drivers/gpu/drm/nouveau/core/subdev/i2c/pad.h | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/drivers/gpu/drm/nouveau/core/subdev/i2c/base.c b/drivers/gpu/drm/nouveau/core/subdev/i2c/base.c index 0dc605db7ec8..e5f1ffaa6ef0 100644 --- a/drivers/gpu/drm/nouveau/core/subdev/i2c/base.c +++ b/drivers/gpu/drm/nouveau/core/subdev/i2c/base.c @@ -494,8 +494,8 @@ nouveau_i2c_create_port(struct nouveau_i2c *i2c, int index, u8 type, oclass = impl->pad_x; } - ret = nouveau_object_ctor(NULL, nv_object(i2c), oclass, NULL, pad, - &parent); + ret = nouveau_object_ctor(nv_object(i2c), nv_object(i2c), oclass, + NULL, pad, &parent); if (ret < 0) return; diff --git a/drivers/gpu/drm/nouveau/core/subdev/i2c/pad.h b/drivers/gpu/drm/nouveau/core/subdev/i2c/pad.h index 452ac10c3004..89aea46a7da1 100644 --- a/drivers/gpu/drm/nouveau/core/subdev/i2c/pad.h +++ b/drivers/gpu/drm/nouveau/core/subdev/i2c/pad.h @@ -14,7 +14,7 @@ static inline struct nvkm_i2c_pad * nvkm_i2c_pad(struct nouveau_i2c_port *port) { struct nouveau_object *pad = nv_object(port); - while (pad->parent) + while (!nv_iclass(pad->parent, NV_SUBDEV_CLASS)) pad = pad->parent; return (void *)pad; } |