From patchwork Wed Mar 21 11:30:17 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "(Exiting) Baolin Wang" X-Patchwork-Id: 10299191 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 753D96055B for ; Wed, 21 Mar 2018 11:31:09 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 5CE2B284FF for ; Wed, 21 Mar 2018 11:31:09 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 513EB297F9; Wed, 21 Mar 2018 11:31:09 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,RCVD_IN_DNSWL_HI,TVD_SUBJ_WIPE_DEBT autolearn=unavailable version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 0EE6729809 for ; Wed, 21 Mar 2018 11:31:09 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752042AbeCULan (ORCPT ); Wed, 21 Mar 2018 07:30:43 -0400 Received: from mail-pl0-f65.google.com ([209.85.160.65]:43075 "EHLO mail-pl0-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752043AbeCULaj (ORCPT ); Wed, 21 Mar 2018 07:30:39 -0400 Received: by mail-pl0-f65.google.com with SMTP id f23-v6so2926999plr.10 for ; Wed, 21 Mar 2018 04:30:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :in-reply-to:references; bh=BvSPnXkWgqt/L58ZFodIRv2/zth/Ju+g1azWUqcwtp0=; b=SV9Bc226Q4SGSALc3EzUW5aYmA8dByBkR0D89pV/MFToComWHQ3xHAK2qMMIyGEAI2 +XNcbKyT8pZdUWpSS2Qvqs3dft5eoxn+YqXeC+Ee5O1ZeR8hVPP4UveL34nv+LuOv5tU hiCuSdIvBaekdflXove5dTkii44obxoHnRmlc= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:in-reply-to:references; bh=BvSPnXkWgqt/L58ZFodIRv2/zth/Ju+g1azWUqcwtp0=; b=KxO33k+IiEnxSjg/bBqmiMezR12VzubeO7bpIAEMD8hZGjFUr08ElfrYf41ub+DPFv vHFy0dE0uJPjLelKjbrjEEcDeS9c/JUSVmFDOkY5Sfm18ZMoXizJUGwPn/o2RbRHVt/I ERlP0G0NDvMaLdQ2FuRb6toH3JRk9Bq9VhqI6povonQ81nNSbbpwEqufRQfmdWCX8qEx TT9/i4fLIJXPeA/BEHrUFHSJzpGQt8cU1KBIUnwrZAevgekWZCuFHEavgaQyXKCNMKAT FRHawB+8cBBEyUrJbcb9SBFL5qKdtwdOAfKhrGuvjCpNqb+YxJIDjcsfd6Gg/6uNVWBH HdBg== X-Gm-Message-State: AElRT7G+/Uiw2BrLicnI7woaOgCSc5w33fesK0wCzV/2QfIWhga48Ft7 WeJ36odk/VDPGsyG2WSgRJsDtQ== X-Google-Smtp-Source: AG47ELsard2qmTR4tigToxpqL/ynuSOUcBe/FMQJmChoxC3GVPGQqp9A7YhwFK3nJBRklh8MkJcsbA== X-Received: by 2002:a17:902:10d:: with SMTP id 13-v6mr19942961plb.266.1521631839219; Wed, 21 Mar 2018 04:30:39 -0700 (PDT) Received: from baolinwangubtpc.spreadtrum.com ([117.18.48.82]) by smtp.gmail.com with ESMTPSA id a9sm8419989pfe.147.2018.03.21.04.30.35 (version=TLS1 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 21 Mar 2018 04:30:38 -0700 (PDT) From: Baolin Wang To: rjw@rjwysocki.net, lenb@kernel.org, pavel@ucw.cz Cc: andrew.smirnov@gmail.com, akpm@linux-foundation.org, broonie@kernel.org, arnd@arndb.de, linux-acpi@vger.kernel.org, linux-kernel@vger.kernel.org, linux-pm@vger.kernel.org, baolin.wang@linaro.org Subject: [PATCH 2/2] kernel / reboot: Remove the pm_power_off_prepare hook Date: Wed, 21 Mar 2018 19:30:17 +0800 Message-Id: X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <7ff55372818461feed4b0550d5f88edce2cc7d41.1521631678.git.baolin.wang@linaro.org> References: <7ff55372818461feed4b0550d5f88edce2cc7d41.1521631678.git.baolin.wang@linaro.org> In-Reply-To: <7ff55372818461feed4b0550d5f88edce2cc7d41.1521631678.git.baolin.wang@linaro.org> References: <7ff55372818461feed4b0550d5f88edce2cc7d41.1521631678.git.baolin.wang@linaro.org> Sender: linux-pm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pm@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP There are no users will prepare to power off system by 'pm_power_off_prepare' hook, thus we can remove it now. Signed-off-by: Baolin Wang --- include/linux/pm.h | 1 - kernel/reboot.c | 8 -------- 2 files changed, 9 deletions(-) diff --git a/include/linux/pm.h b/include/linux/pm.h index e723b78..cff7668 100644 --- a/include/linux/pm.h +++ b/include/linux/pm.h @@ -32,7 +32,6 @@ * Callbacks for platform drivers to implement. */ extern void (*pm_power_off)(void); -extern void (*pm_power_off_prepare)(void); struct device; /* we have a circular dep with device.h */ #ifdef CONFIG_VT_CONSOLE_SLEEP diff --git a/kernel/reboot.c b/kernel/reboot.c index e4ced88..6667b63 100644 --- a/kernel/reboot.c +++ b/kernel/reboot.c @@ -44,12 +44,6 @@ enum reboot_type reboot_type = BOOT_ACPI; int reboot_force; -/* - * If set, this is used for preparing the system to power off. - */ - -void (*pm_power_off_prepare)(void); - /** * emergency_restart - reboot the system * @@ -284,8 +278,6 @@ void kernel_halt(void) void kernel_power_off(void) { kernel_shutdown_prepare(SYSTEM_POWER_OFF); - if (pm_power_off_prepare) - pm_power_off_prepare(); migrate_to_reboot_cpu(); syscore_shutdown(); pr_emerg("Power down\n");