diff options
author | Ben Skeggs <bskeggs@redhat.com> | 2013-02-26 23:52:47 (GMT) |
---|---|---|
committer | Ben Skeggs <bskeggs@redhat.com> | 2013-03-04 01:46:20 (GMT) |
commit | 42bed34c364786b3757f9d788d8ed39120e8f1b5 (patch) | |
tree | 211380b5882d938b20c39456676df793ef5dd938 /drivers/gpu/drm/nouveau/core/subdev | |
parent | 67f9718b084ea7100cefa39b02863fcb14102f8c (diff) | |
download | linux-fsl-qoriq-42bed34c364786b3757f9d788d8ed39120e8f1b5.tar.xz |
drm/nouveau/i2c: drop parent refcount when creating ports
Fixes issue where i2c subdev never gets destroyed due to its subobjects
holding references. This will mean the i2c subdev refcount goes
negative during its destruction, but this isn't an issue in practice.
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Diffstat (limited to 'drivers/gpu/drm/nouveau/core/subdev')
-rw-r--r-- | drivers/gpu/drm/nouveau/core/subdev/i2c/base.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/gpu/drm/nouveau/core/subdev/i2c/base.c b/drivers/gpu/drm/nouveau/core/subdev/i2c/base.c index a114a0e..2e98e8a 100644 --- a/drivers/gpu/drm/nouveau/core/subdev/i2c/base.c +++ b/drivers/gpu/drm/nouveau/core/subdev/i2c/base.c @@ -142,6 +142,7 @@ nouveau_i2c_port_create_(struct nouveau_object *parent, /* drop port's i2c subdev refcount, i2c handles this itself */ if (ret == 0) { list_add_tail(&port->head, &i2c->ports); + atomic_dec(&parent->refcount); atomic_dec(&engine->refcount); } |