Skip to content

Commit

Permalink
i2c-nomadik: fix regression on adapter name
Browse files Browse the repository at this point in the history
The Nomadik I2C adapter does not provide a name for the struct
passed into i2c_add_numbered_adapter() causing a regression on
2.6.37-rc3 due to commit 2236baa
adding sanity checks for adapters. Fix this by providing a name
proper.

Cc: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Linus Walleij <linus.walleij@stericsson.com>
Signed-off-by: Ben Dooks <ben-linux@fluff.org>
  • Loading branch information
Linus Walleij authored and Ben Dooks committed Jan 4, 2011
1 parent 03ed6a3 commit 6d779a4
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions drivers/i2c/busses/i2c-nomadik.c
Original file line number Diff line number Diff line change
Expand Up @@ -872,6 +872,8 @@ static int __devinit nmk_i2c_probe(struct platform_device *pdev)
adap->owner = THIS_MODULE;
adap->class = I2C_CLASS_HWMON | I2C_CLASS_SPD;
adap->algo = &nmk_i2c_algo;
snprintf(adap->name, sizeof(adap->name),
"Nomadik I2C%d at %lx", pdev->id, (unsigned long)res->start);

/* fetch the controller id */
adap->nr = pdev->id;
Expand All @@ -891,8 +893,8 @@ static int __devinit nmk_i2c_probe(struct platform_device *pdev)
goto err_init_hw;
}

dev_dbg(&pdev->dev, "initialize I2C%d bus on virtual "
"base %p\n", pdev->id, dev->virtbase);
dev_info(&pdev->dev, "initialize %s on virtual "
"base %p\n", adap->name, dev->virtbase);

ret = i2c_add_numbered_adapter(adap);
if (ret) {
Expand Down

0 comments on commit 6d779a4

Please sign in to comment.