aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/nouveau/core/subdev/i2c/nv4e.c
diff options
context:
space:
mode:
authorIlia Mirkin <imirkin@alum.mit.edu>2013-08-23 13:03:14 -0400
committerBen Skeggs <bskeggs@redhat.com>2013-09-04 13:46:58 +1000
commitc865534f1e5b5b4ef03f4a55cf4730f4b70dd75b (patch)
treebd17cd7a9d546620acc877048cb48554e0e8068c /drivers/gpu/drm/nouveau/core/subdev/i2c/nv4e.c
parentdrm/nouveau/therm: survive to suspend/resume cycles (diff)
downloadlinux-dev-c865534f1e5b5b4ef03f4a55cf4730f4b70dd75b.tar.xz
linux-dev-c865534f1e5b5b4ef03f4a55cf4730f4b70dd75b.zip
drm/nouveau/i2c: pass the function pointers in at creation time
i2c_bit_add_bus can call the pre_xfer function, which expects the func pointer to be set. Pass in func to the port creation logic so that it is set before i2c_bit_add_bus. See https://bugs.freedesktop.org/show_bug.cgi?id=68456 Reported-by: Hans-Peter Deifel <hpdeifel@gmx.de> Tested-by: Hans-Peter Deifel <hpdeifel@gmx.de> Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Diffstat (limited to 'drivers/gpu/drm/nouveau/core/subdev/i2c/nv4e.c')
-rw-r--r--drivers/gpu/drm/nouveau/core/subdev/i2c/nv4e.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/gpu/drm/nouveau/core/subdev/i2c/nv4e.c b/drivers/gpu/drm/nouveau/core/subdev/i2c/nv4e.c
index f501ae25dbb3..0c2655a03bb4 100644
--- a/drivers/gpu/drm/nouveau/core/subdev/i2c/nv4e.c
+++ b/drivers/gpu/drm/nouveau/core/subdev/i2c/nv4e.c
@@ -84,12 +84,12 @@ nv4e_i2c_port_ctor(struct nouveau_object *parent, struct nouveau_object *engine,
int ret;
ret = nouveau_i2c_port_create(parent, engine, oclass, index,
- &nouveau_i2c_bit_algo, &port);
+ &nouveau_i2c_bit_algo, &nv4e_i2c_func,
+ &port);
*pobject = nv_object(port);
if (ret)
return ret;
- port->base.func = &nv4e_i2c_func;
port->addr = 0x600800 + info->drive;
return 0;
}