diff options
author | venu byravarasu <vbyravarasu@nvidia.com> | 2011-09-26 13:25:55 +0530 |
---|---|---|
committer | Dan Willemsen <dwillemsen@nvidia.com> | 2011-11-30 21:49:00 -0800 |
commit | 2e5428037e046579461a705ba17b6cea415a042c (patch) | |
tree | 1aa15ebf4cf8133590582b20a80e34afb8e801fe /drivers/misc | |
parent | aa30353cb028ea287ac1f0d51033813f37366db0 (diff) |
misc: nct1008: fixing regulator handling
Corrected regulator handling of NCT1008
bug 869217
Reviewed-on: http://git-master/r/51296
(cherry picked from commit 6b39c9f51b3c09c6aa0b1cd7e7a3fdb122200d14)
Change-Id: Ibae0c651322e9191942a1be8f544916f7333d967
Reviewed-on: http://git-master/r/54224
Tested-by: Venu Byravarasu <vbyravarasu@nvidia.com>
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>
Rebase-Id: R942722fef526eda21b1296ecefb17b08f29ad44f
Diffstat (limited to 'drivers/misc')
-rw-r--r-- | drivers/misc/nct1008.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/drivers/misc/nct1008.c b/drivers/misc/nct1008.c index ef157c3334e7..5cc8974c9208 100644 --- a/drivers/misc/nct1008.c +++ b/drivers/misc/nct1008.c @@ -549,10 +549,11 @@ static void nct1008_power_control(struct nct1008_data *data, bool is_enable) { int ret; if (!data->nct_reg) { - data->nct_reg = regulator_get(NULL, "vdd_nct1008"); + data->nct_reg = regulator_get(data->client->dev, "vdd"); if (IS_ERR_OR_NULL(data->nct_reg)) { - dev_warn(&data->client->dev, "Error in getting the " - "regulator handle for vdd_nct1008\n"); + dev_warn(&data->client->dev, "Error [%d] in" + "getting the regulator handle for vdd of %s\n", + data->nct_reg, dev_name(data->client->dev)); data->nct_reg = NULL; return; } |