hwmon: qpnp-adc-voltage: Update condition for reading temp through VADC

ADC driver prints error log whenever vadc read fails. Update the
condition such that log gets printed for error case and not for probe
deferal.

Change-Id: Ieff7f82fbe508a8422f666635a489f45f2deb41f
Signed-off-by: Rama Krishna Phani A <rphani@codeaurora.org>
This commit is contained in:
Rama Krishna Phani A 2016-01-25 11:54:12 +05:30 committed by David Keitel
parent f36bb94db7
commit ad747e5b63

View file

@ -1,4 +1,4 @@
/* Copyright (c) 2012-2015, The Linux Foundation. All rights reserved.
/* Copyright (c) 2012-2016, The Linux Foundation. All rights reserved.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 and
@ -2478,7 +2478,8 @@ static int qpnp_vadc_get_temp(struct thermal_zone_device *thermal,
rc = qpnp_vadc_read(vadc,
vadc_therm->vadc_channel, &result);
if (rc) {
pr_err("VADC read error with %d\n", rc);
if (rc != -EPROBE_DEFER)
pr_err("VADC read error with %d\n", rc);
return rc;
}