• Axel Lin's avatar
    mfd: ab8500-gpadc: Complain if we fail to enable vtvout LDO · 54fc4037
    Axel Lin authored
    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: default avatarAxel Lin <axel.lin@ingics.com>
    Signed-off-by: default avatarSamuel Ortiz <sameo@linux.intel.com>
    54fc4037
ab8500-gpadc.c 19.9 KB