Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 358302
b: refs/heads/master
c: eaa8e7a
h: refs/heads/master
v: v3
  • Loading branch information
Ben Skeggs committed Feb 20, 2013
1 parent 9518ba2 commit 408e4c7
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: f3ed1048715f2edc10c4dda6148b60e93f6282ed
refs/heads/master: eaa8e7ab99d1b33db9362f35c1d65df8df39dea9
8 changes: 4 additions & 4 deletions trunk/drivers/gpu/drm/nouveau/core/subdev/i2c/base.c
Original file line number Diff line number Diff line change
Expand Up @@ -46,13 +46,13 @@ nv_rdi2cr(struct nouveau_i2c_port *port, u8 addr, u8 reg)
int
nv_wri2cr(struct nouveau_i2c_port *port, u8 addr, u8 reg, u8 val)
{
u8 buf[2] = { reg, val };
struct i2c_msg msgs[] = {
{ .addr = addr, .flags = 0, .len = 1, .buf = &reg },
{ .addr = addr, .flags = 0, .len = 1, .buf = &val },
{ .addr = addr, .flags = 0, .len = 2, .buf = buf },
};

int ret = i2c_transfer(&port->adapter, msgs, 2);
if (ret != 2)
int ret = i2c_transfer(&port->adapter, msgs, 1);
if (ret != 1)
return -EIO;

return 0;
Expand Down

0 comments on commit 408e4c7

Please sign in to comment.