Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 67230
b: refs/heads/master
c: e78bb5d
h: refs/heads/master
v: v3
  • Loading branch information
Guennadi Liakhovetski authored and Paul Mackerras committed Aug 17, 2007
1 parent e7d0454 commit 786fdd5
Show file tree
Hide file tree
Showing 2 changed files with 10 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: 750d1d1ca1d2e94e15393927fd3c30222d1c5203
refs/heads/master: e78bb5dc2e0515dce2ac2c590d66405028b7ccd6
13 changes: 9 additions & 4 deletions trunk/arch/powerpc/sysdev/fsl_soc.c
Original file line number Diff line number Diff line change
Expand Up @@ -320,21 +320,26 @@ static struct i2c_driver_device i2c_devices[] __initdata = {
{"ricoh,rv5c387a", "rtc-rs5c372", "rv5c387a",},
};

static int __init of_find_i2c_driver(struct device_node *node, struct i2c_board_info *info)
static int __init of_find_i2c_driver(struct device_node *node,
struct i2c_board_info *info)
{
int i;

for (i = 0; i < ARRAY_SIZE(i2c_devices); i++) {
if (!of_device_is_compatible(node, i2c_devices[i].of_device))
continue;
strncpy(info->driver_name, i2c_devices[i].i2c_driver, KOBJ_NAME_LEN);
strncpy(info->type, i2c_devices[i].i2c_type, I2C_NAME_SIZE);
if (strlcpy(info->driver_name, i2c_devices[i].i2c_driver,
KOBJ_NAME_LEN) >= KOBJ_NAME_LEN ||
strlcpy(info->type, i2c_devices[i].i2c_type,
I2C_NAME_SIZE) >= I2C_NAME_SIZE)
return -ENOMEM;
return 0;
}
return -ENODEV;
}

static void __init of_register_i2c_devices(struct device_node *adap_node, int bus_num)
static void __init of_register_i2c_devices(struct device_node *adap_node,
int bus_num)
{
struct device_node *node = NULL;

Expand Down

0 comments on commit 786fdd5

Please sign in to comment.