summaryrefslogtreecommitdiff
path: root/drivers/misc
diff options
context:
space:
mode:
authorPreetham Chandru <pchandru@nvidia.com>2012-04-02 12:10:19 +0530
committerRohan Somvanshi <rsomvanshi@nvidia.com>2012-04-05 08:54:23 -0700
commit9f4174ca7cf958a64654c8aeee8029f8ff3935e8 (patch)
treed996b6e5b4cbb8565d6f27b1e6e8749b2c61f087 /drivers/misc
parent79b4407eb662a48983660ef1ccd3e3907d5e1972 (diff)
drivers: misc: nct: Remove regulator error message
Print only a warning message if vdd regulator is not registered. Some board do not have a seperate vdd regulator and hence print only a warning message in such cases. Bug 961258 Signed-off-by: Preetham Chandru R <pchandru@nvidia.com> Change-Id: I953d17ae14650c622e06febe415362e5cb096236 Reviewed-on: http://git-master/r/93777 Reviewed-by: Automatic_Commit_Validation_User Reviewed-by: Matthew Longnecker <mlongnecker@nvidia.com> Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com>
Diffstat (limited to 'drivers/misc')
-rw-r--r--drivers/misc/nct1008.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/drivers/misc/nct1008.c b/drivers/misc/nct1008.c
index 3a8aa6b9dbd2..8931c8a673e5 100644
--- a/drivers/misc/nct1008.c
+++ b/drivers/misc/nct1008.c
@@ -545,10 +545,14 @@ static void nct1008_power_control(struct nct1008_data *data, bool is_enable)
if (!data->nct_reg) {
data->nct_reg = regulator_get(&data->client->dev, "vdd");
if (IS_ERR_OR_NULL(data->nct_reg)) {
- dev_warn(&data->client->dev, "Error [%d] in"
- "getting the regulator handle for vdd "
- "of %s\n", (int)data->nct_reg,
- dev_name(&data->client->dev));
+ if (PTR_ERR(data->nct_reg) == -ENODEV)
+ dev_info(&data->client->dev,
+ "no regulator found for vdd."
+ " Assuming vdd is always powered");
+ else
+ dev_warn(&data->client->dev, "Error [%ld] in "
+ "getting the regulator handle for"
+ " vdd\n", PTR_ERR(data->nct_reg));
data->nct_reg = NULL;
return;
}