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: 132204 Delivered-To: patch@linaro.org Received: by 10.46.84.29 with SMTP id i29csp2020262ljb; Wed, 21 Mar 2018 04:30:52 -0700 (PDT) X-Google-Smtp-Source: AG47ELsVWDE8KkYMw60cZBenm7hs5VSyheONkgjV4O5cRVvHO4VmEQHeoYjsXyBUeYsu1ygUnt0e X-Received: by 2002:a17:902:5814:: with SMTP id m20-v6mr19309036pli.311.1521631852059; Wed, 21 Mar 2018 04:30:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1521631852; cv=none; d=google.com; s=arc-20160816; b=iOmPEEHsc7U+k0rU5b8Ve+WdLWz7IVHomSZucy+0rTMSHSUL+8Dw3zve3TvzeYgGjH 7p/rJ7NvPTg9pWgPtKK6+vA0fgQ9nQDWBj9VtNLe7T13AIOzMSAsTHcYmp6xQUO8QreB pEo1LP1Gfy7n9Dtq293kHmv6X8CUk4CPfN1afHg7zs3rNozrb7lh15Cnla4oj/yfwY26 yB4m7RyrE6IMb/cVvKcsMrrXJ7gpDnY3NyVvdh/xoij1PC45BfD6pcOZP/seZoG09Rj9 KpX6FcyoagD9U4sNZEm9V4WrMI5UbtZMlxGmumyYFbWztuVXmKHhL63ge3RTGqTycqca XUpQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:references :in-reply-to:message-id:date:subject:cc:to:from:dkim-signature :arc-authentication-results; bh=BvSPnXkWgqt/L58ZFodIRv2/zth/Ju+g1azWUqcwtp0=; b=tfQuDW6F8Skn/nCcvvAchr0Gg3UKjXd0DoI5I0VwiLfGov1/r1sq04bC8nWV6JKdCa aD/DsSLPm1XMhqDksSMMWJoDj+asTGJ0O1KkV/vfIna6mugrWy60j1zu3U0dXT4jAqoH IG5RQBEsbRsDTHH2MFOdkSKNDCkl7P8YWhjTrO0QmkIdIYN596yRe0jVqEUA1inF9W4c 56Q+le/ozl81oXdHTIanYKXRBRj5aKIrsuHGOQwuWjY2NErcQydrZf1gMA0/F3XmN/uR bPLNYwQlAUV+ubKToDd53mAMU1untHmx+bTiu0RhpPGWsE3fXkKY7gTFfHPTjk4GjAmv bdsg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=SV9Bc226; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id g6si2654259pgr.339.2018.03.21.04.30.51; Wed, 21 Mar 2018 04:30:52 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=SV9Bc226; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752217AbeCULas (ORCPT + 28 others); Wed, 21 Mar 2018 07:30:48 -0400 Received: from mail-pl0-f67.google.com ([209.85.160.67]:42651 "EHLO mail-pl0-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752091AbeCULaj (ORCPT ); Wed, 21 Mar 2018 07:30:39 -0400 Received: by mail-pl0-f67.google.com with SMTP id w15-v6so2927449plq.9 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=XUN0lZZJZhf/TPkKiFQP8upMrfTPUo/ntIQuGZC1F4JiGkNxrRO5NrG8OeRC7lo1nl rpBiSn+yvS5vODQVEAb/4mvh7iLovy+xKrqa94ZQWYFAlwxf07ZDX5LtTBf0q2rFENSD pK5J9ory4+cNDwC1jdf9IJZq1rVMBOkE0G44t2KNUaH1ZuHl/BOi4FUtU0JBPSPhx5+P nMi3wXoNqfy26LbpbAEqLRm61BxyN9bLJb7gqtDREBmI2bFZSTBmYIFCaOAE0QJnrtbw MqLy6gnyvsEHv72/wDopMdnF8ZXHijCuwbM/SCQO/EaX4MPBlLuwW8yMUSlXsaEPU9x7 jirw== X-Gm-Message-State: AElRT7Ge1UJM6FF7rJC81ZWjVjvtMiNMtw8noz8hSff8AWNxY5jIGtpT 5HT8EKu5/u5/qw94T6399t0S2Q== 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-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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(-) -- 1.7.9.5 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");