]> git.proxmox.com Git - mirror_ubuntu-focal-kernel.git/commitdiff
regulator: act8945a-regulator: fix 'defined but not used' compiler warning
authorClaudiu Beznea <claudiu.beznea@microchip.com>
Mon, 17 Dec 2018 10:37:51 +0000 (10:37 +0000)
committerMark Brown <broonie@kernel.org>
Mon, 17 Dec 2018 12:30:57 +0000 (12:30 +0000)
Fix 'defined but not used' compiler warning for act8945a_suspend()
function in case CONFIG_PM_SLEEP is not defined.

Fixes: b5ebba46e694 ("regulator: act8945a-regulator: add shutdown function")
Signed-off-by: Claudiu Beznea <claudiu.beznea@microchip.com>
Reported-by: Andrei Stefanescu <andrei.stefanescu@microchip.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
drivers/regulator/act8945a-regulator.c

index 90572b6370c696be40ee80fa8abf7db67ad40aa6..1572725361222c99b6a6405d502b90445d468411 100644 (file)
@@ -326,7 +326,7 @@ static int act8945a_pmic_probe(struct platform_device *pdev)
        return regmap_write(act8945a->regmap, ACT8945A_SYS_UNLK_REGS, 0xef);
 }
 
-static int act8945a_suspend(struct device *pdev)
+static int __maybe_unused act8945a_suspend(struct device *pdev)
 {
        struct act8945a_pmic *act8945a = dev_get_drvdata(pdev);