Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 92424
b: refs/heads/master
c: a588585
h: refs/heads/master
v: v3
  • Loading branch information
Marcin Slusarz authored and Mauro Carvalho Chehab committed Apr 24, 2008
1 parent 2ec18be commit a91a505
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 8 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: 1c3bf598cf794558694c8beb0c8c7056a81dbe04
refs/heads/master: a58858556deb03ea4a464f84fe888692867ce377
18 changes: 11 additions & 7 deletions trunk/drivers/media/video/ir-kbd-i2c.c
Original file line number Diff line number Diff line change
Expand Up @@ -509,9 +509,9 @@ static int ir_probe(struct i2c_adapter *adap)
static const int probe_cx88[] = { 0x18, 0x6b, 0x71, -1 };
static const int probe_cx23885[] = { 0x6b, -1 };
const int *probe = NULL;
struct i2c_client c;
struct i2c_client *c;
unsigned char buf;
int i,rc;
int i, rc;

switch (adap->id) {
case I2C_HW_B_BT848:
Expand All @@ -536,19 +536,23 @@ static int ir_probe(struct i2c_adapter *adap)
if (NULL == probe)
return 0;

memset(&c,0,sizeof(c));
c.adapter = adap;
c = kzalloc(sizeof(*c), GFP_KERNEL);
if (!c)
return -ENOMEM;

c->adapter = adap;
for (i = 0; -1 != probe[i]; i++) {
c.addr = probe[i];
rc = i2c_master_recv(&c,&buf,0);
c->addr = probe[i];
rc = i2c_master_recv(c, &buf, 0);
dprintk(1,"probe 0x%02x @ %s: %s\n",
probe[i], adap->name,
(0 == rc) ? "yes" : "no");
if (0 == rc) {
ir_attach(adap,probe[i],0,0);
ir_attach(adap, probe[i], 0, 0);
break;
}
}
kfree(c);
return 0;
}

Expand Down

0 comments on commit a91a505

Please sign in to comment.