linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Geert Uytterhoeven <geert@linux-m68k.org>
To: Dmitry Osipenko <dmitry.osipenko@collabora.com>,
	"Rafael J . Wysocki" <rafael.j.wysocki@intel.com>
Cc: Laurent Vivier <laurent@vivier.eu>,
	Stephen Rothwell <sfr@canb.auug.org.au>,
	linux-m68k@lists.linux-m68k.org, linux-kernel@vger.kernel.org,
	Geert Uytterhoeven <geert@linux-m68k.org>,
	noreply@ellerman.id.au
Subject: [PATCH next] m68k: virt: Switch to new sys-off handler API
Date: Mon, 23 May 2022 19:55:20 +0200	[thread overview]
Message-ID: <20220523175520.949681-1-geert@linux-m68k.org> (raw)

On m68k with CONFIG_VIRT=y (e.g. virt_defconfig or allmodconfig):

    arch/m68k/virt/config.c: In function ‘config_virt’:
    arch/m68k/virt/config.c:129:2: error: ‘mach_power_off’ undeclared (first use in this function); did you mean ‘pm_power_off’?
      129 |  mach_power_off = virt_halt;
	  |  ^~~~~~~~~~~~~~
	  |  pm_power_off

Commit 05d51e42df06f021 ("m68k: Introduce a virtual m68k machine")
introduced a new user of mach_power_off.
Convert it to the new sys-off handler API, too.

Reported-by: noreply@ellerman.id.au
Fixes: f0f7e5265b3b37b0 ("m68k: Switch to new sys-off handler API")
Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
---
 arch/m68k/virt/config.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/arch/m68k/virt/config.c b/arch/m68k/virt/config.c
index 68d29c8b87e18840..632ba200ad425245 100644
--- a/arch/m68k/virt/config.c
+++ b/arch/m68k/virt/config.c
@@ -1,5 +1,6 @@
 // SPDX-License-Identifier: GPL-2.0
 
+#include <linux/reboot.h>
 #include <linux/serial_core.h>
 #include <clocksource/timer-goldfish.h>
 
@@ -126,5 +127,6 @@ void __init config_virt(void)
 	mach_get_model = virt_get_model;
 	mach_reset = virt_reset;
 	mach_halt = virt_halt;
-	mach_power_off = virt_halt;
+
+	register_platform_power_off(virt_halt);
 }
-- 
2.25.1


             reply	other threads:[~2022-05-23 18:31 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-05-23 17:55 Geert Uytterhoeven [this message]
2022-05-23 18:01 ` [PATCH next] m68k: virt: Switch to new sys-off handler API Dmitry Osipenko
2022-05-23 20:10 ` Laurent Vivier

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20220523175520.949681-1-geert@linux-m68k.org \
    --to=geert@linux-m68k.org \
    --cc=dmitry.osipenko@collabora.com \
    --cc=laurent@vivier.eu \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-m68k@lists.linux-m68k.org \
    --cc=noreply@ellerman.id.au \
    --cc=rafael.j.wysocki@intel.com \
    --cc=sfr@canb.auug.org.au \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).