]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
psci: Do not define do_poweroff() if CONFIG_SYSRESET_CMD_POWEROFF is enabled
authorMichal Simek <michal.simek@xilinx.com>
Tue, 13 Jul 2021 14:53:46 +0000 (16:53 +0200)
committerMichal Simek <michal.simek@xilinx.com>
Mon, 26 Jul 2021 07:18:45 +0000 (09:18 +0200)
CONFIG_SYSRESET_CMD_POWEROFF defines do_poweroff() in sysreset-uclass.c
that's why don't define it twice when both CONFIG_SYSRESET_CMD_POWEROFF and
CONFIG_CMD_POWEROFF are enabled. CONFIG_SYSRESET_CMD_POWEROFF depends on
CONFIG_CMD_POWEROFF.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
drivers/firmware/psci.c

index 89cb7d88e5b3ea0d060ffac74008150ed2042b3d..657e7eb5aea387adf0c534c525a1d8263a7aa1e8 100644 (file)
@@ -210,7 +210,7 @@ void psci_sys_poweroff(void)
        invoke_psci_fn(PSCI_0_2_FN_SYSTEM_OFF, 0, 0, 0);
 }
 
-#ifdef CONFIG_CMD_POWEROFF
+#if IS_ENABLED(CONFIG_CMD_POWEROFF) && !IS_ENABLED(CONFIG_SYSRESET_CMD_POWEROFF)
 int do_poweroff(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
 {
        do_psci_probe();