diff options
author | Linus Walleij <linus.walleij@stericsson.com> | 2010-11-30 10:59:29 -0500 |
---|---|---|
committer | Ben Dooks <ben-linux@fluff.org> | 2011-01-03 20:17:55 -0500 |
commit | 6d779a4c3f97023fe329ef33aba25c8aaadf281b (patch) | |
tree | 4555e3e2d79e5cdb16de3230e3f167366ebf15d3 /drivers/i2c | |
parent | 03ed6a3aa600c48593c3984812fda2d5945ddb46 (diff) |
i2c-nomadik: fix regression on adapter name
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 2236baa75f704851d3cd3310569058151acb1f06
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>
Diffstat (limited to 'drivers/i2c')
-rw-r--r-- | drivers/i2c/busses/i2c-nomadik.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/i2c/busses/i2c-nomadik.c b/drivers/i2c/busses/i2c-nomadik.c index c9fffd0389fe..f7148fdd46e0 100644 --- a/drivers/i2c/busses/i2c-nomadik.c +++ b/drivers/i2c/busses/i2c-nomadik.c | |||
@@ -872,6 +872,8 @@ static int __devinit nmk_i2c_probe(struct platform_device *pdev) | |||
872 | adap->owner = THIS_MODULE; | 872 | adap->owner = THIS_MODULE; |
873 | adap->class = I2C_CLASS_HWMON | I2C_CLASS_SPD; | 873 | adap->class = I2C_CLASS_HWMON | I2C_CLASS_SPD; |
874 | adap->algo = &nmk_i2c_algo; | 874 | adap->algo = &nmk_i2c_algo; |
875 | snprintf(adap->name, sizeof(adap->name), | ||
876 | "Nomadik I2C%d at %lx", pdev->id, (unsigned long)res->start); | ||
875 | 877 | ||
876 | /* fetch the controller id */ | 878 | /* fetch the controller id */ |
877 | adap->nr = pdev->id; | 879 | adap->nr = pdev->id; |
@@ -891,8 +893,8 @@ static int __devinit nmk_i2c_probe(struct platform_device *pdev) | |||
891 | goto err_init_hw; | 893 | goto err_init_hw; |
892 | } | 894 | } |
893 | 895 | ||
894 | dev_dbg(&pdev->dev, "initialize I2C%d bus on virtual " | 896 | dev_info(&pdev->dev, "initialize %s on virtual " |
895 | "base %p\n", pdev->id, dev->virtbase); | 897 | "base %p\n", adap->name, dev->virtbase); |
896 | 898 | ||
897 | ret = i2c_add_numbered_adapter(adap); | 899 | ret = i2c_add_numbered_adapter(adap); |
898 | if (ret) { | 900 | if (ret) { |