summaryrefslogtreecommitdiff
path: root/drivers/i2c
diff options
context:
space:
mode:
authorMayuresh Kulkarni <mkulkarni@nvidia.com>2012-04-23 18:04:45 +0530
committerDan Willemsen <dwillemsen@nvidia.com>2013-09-14 00:49:19 -0700
commita407b08cc8d976c747cb8d078ee5c6c4a40f84ab (patch)
treed0d8b48fd238920323229d77744877192c070b9c /drivers/i2c
parent3eadb4dc196938f6d30841b0602249b0dda980b7 (diff)
i2c: mux: pca954x: correct PTR_ERR for regulator
- 3.4 kernel core for regulator returns EPROBE_DEFER for regulator_get() instead of ENODEV - this driver was using ENODEV causing its probe fail Bug 974063 Bug 974078 Change-Id: Ibf8a6b63c67c084e615c3516144f556c06a34dd7 Signed-off-by: Mayuresh Kulkarni <mkulkarni@nvidia.com> Reviewed-on: http://git-master/r/98203 Reviewed-by: Pritesh Raithatha <praithatha@nvidia.com> Reviewed-by: Varun Wadekar <vwadekar@nvidia.com> Rebase-Id: R316491fd8a7e107de79c61b0106ebe54a9e440ec
Diffstat (limited to 'drivers/i2c')
-rw-r--r--drivers/i2c/muxes/i2c-mux-pca954x.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/i2c/muxes/i2c-mux-pca954x.c b/drivers/i2c/muxes/i2c-mux-pca954x.c
index 51eae6b57f79..15bf2ae32320 100644
--- a/drivers/i2c/muxes/i2c-mux-pca954x.c
+++ b/drivers/i2c/muxes/i2c-mux-pca954x.c
@@ -237,7 +237,7 @@ static int pca954x_probe(struct i2c_client *client,
/* Get regulator pointer for pca954x vcc */
data->vcc_reg = regulator_get(&client->dev, "vcc");
- if (PTR_ERR(data->vcc_reg) == -ENODEV)
+ if (PTR_ERR(data->vcc_reg) == -EPROBE_DEFER)
data->vcc_reg = NULL;
else if (IS_ERR(data->vcc_reg)) {
dev_err(&client->dev, "%s: failed to get vcc\n",
@@ -247,7 +247,7 @@ static int pca954x_probe(struct i2c_client *client,
}
/* Get regulator pointer for pca954x vcc_i2c */
data->i2c_reg = regulator_get(&client->dev, "vcc_i2c");
- if (PTR_ERR(data->i2c_reg) == -ENODEV)
+ if (PTR_ERR(data->i2c_reg) == -EPROBE_DEFER)
data->i2c_reg = NULL;
else if (IS_ERR(data->i2c_reg)) {
dev_err(&client->dev, "%s: failed to get vcc_i2c\n",