Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 347045
b: refs/heads/master
c: 58a7371
h: refs/heads/master
i:
  347043: da3117c
v: v3
  • Loading branch information
Bo Shen authored and Wolfram Sang committed Nov 14, 2012
1 parent 999e993 commit a4fdf2a
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 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: 970d494c323826d8bb21e8ed1796da15082808ec
refs/heads/master: 58a7371a4dd9d03f77265ee2784781fc39096136
6 changes: 5 additions & 1 deletion trunk/drivers/i2c/busses/i2c-gpio.c
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,11 @@ static int __devinit i2c_gpio_probe(struct platform_device *pdev)
bit_data->data = pdata;

adap->owner = THIS_MODULE;
snprintf(adap->name, sizeof(adap->name), "i2c-gpio%d", pdev->id);
if (pdev->dev.of_node)
strlcpy(adap->name, dev_name(&pdev->dev), sizeof(adap->name));
else
snprintf(adap->name, sizeof(adap->name), "i2c-gpio%d", pdev->id);

adap->algo_data = bit_data;
adap->class = I2C_CLASS_HWMON | I2C_CLASS_SPD;
adap->dev.parent = &pdev->dev;
Expand Down

0 comments on commit a4fdf2a

Please sign in to comment.