diff options
author | Ilia Mirkin <imirkin@alum.mit.edu> | 2013-08-23 13:03:14 -0400 |
---|---|---|
committer | Ben Skeggs <bskeggs@redhat.com> | 2013-09-17 08:18:04 +1000 |
commit | 37c33b5fbbc4e704a92074f8889b35790a4fb4fa (patch) | |
tree | 6b47daaab161e68ce7671f06e2a9c36194757410 /nvkm/subdev/i2c/nvd0.c | |
parent | 3063dcbe310cb1f2120a61fed8fc7d9e216e2e8e (diff) | |
download | nouveau-37c33b5fbbc4e704a92074f8889b35790a4fb4fa.tar.gz |
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 'nvkm/subdev/i2c/nvd0.c')
-rw-r--r-- | nvkm/subdev/i2c/nvd0.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/nvkm/subdev/i2c/nvd0.c b/nvkm/subdev/i2c/nvd0.c index f761b8a61..29967d30f 100644 --- a/nvkm/subdev/i2c/nvd0.c +++ b/nvkm/subdev/i2c/nvd0.c @@ -60,12 +60,12 @@ nvd0_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, &nvd0_i2c_func, + &port); *pobject = nv_object(port); if (ret) return ret; - port->base.func = &nvd0_i2c_func; port->state = 0x00000007; port->addr = 0x00d014 + (info->drive * 0x20); if (info->share != DCB_I2C_UNUSED) { |