mfd: ab8500-gpadc: Complain if we fail to enable vtvout LDO
authorAxel Lin <axel.lin@ingics.com>
Sat, 9 Mar 2013 09:46:45 +0000 (17:46 +0800)
committerSamuel Ortiz <sameo@linux.intel.com>
Tue, 12 Mar 2013 08:34:39 +0000 (09:34 +0100)
commit54fc4037ac449acf96ab88c3e65633c997df8a84
treeff0b6d1bbc7d1f88a2f33cf9909f392ba32b0a93
parentfd860195a4f9d661754345bd06a3adb30d12d882
mfd: ab8500-gpadc: Complain if we fail to enable vtvout LDO

Since commit c8801a8e
"regulator: core: Mark all get and enable calls as __must_check",
we must check return value of regulator_enable() to silence below build warning.

  CC      drivers/mfd/ab8500-gpadc.o
drivers/mfd/ab8500-gpadc.c: In function 'ab8500_gpadc_runtime_resume':
drivers/mfd/ab8500-gpadc.c:598:18: warning: ignoring return value of 'regulator_enable', declared with attribute warn_unused_result [-Wunused-result]
drivers/mfd/ab8500-gpadc.c: In function 'ab8500_gpadc_probe':
drivers/mfd/ab8500-gpadc.c:655:18: warning: ignoring return value of 'regulator_enable', declared with attribute warn_unused_result [-Wunused-result]

Also convert to devm_regulator_get(), this fixes a missing regulator_put() call
in ab8500_gpadc_remove().

Signed-off-by: Axel Lin <axel.lin@ingics.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
drivers/mfd/ab8500-gpadc.c