From patchwork Fri Sep 19 18:27:35 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ulf Hansson X-Patchwork-Id: 4939331 Return-Path: X-Original-To: patchwork-linux-acpi@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 2EE1D9F2EC for ; Fri, 19 Sep 2014 18:28:04 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 345D520200 for ; Fri, 19 Sep 2014 18:28:03 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id D07F120220 for ; Fri, 19 Sep 2014 18:28:01 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757613AbaISS2A (ORCPT ); Fri, 19 Sep 2014 14:28:00 -0400 Received: from mail-pd0-f182.google.com ([209.85.192.182]:63130 "EHLO mail-pd0-f182.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757707AbaISS16 (ORCPT ); Fri, 19 Sep 2014 14:27:58 -0400 Received: by mail-pd0-f182.google.com with SMTP id p10so253220pdj.13 for ; Fri, 19 Sep 2014 11:27:57 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=IwkUh0rS9SBulBbZrFu2n2BpAJDRnF9wM92ZZkOVII8=; b=AKMvJb9vm/oZqWBHwOVpBqQNZYgLBJY5TxrEz9EKUPNaZMMtbN2ET9NLwDmvZ2mvEp K4uOO/tu/zpdknOOkX7jJvLIaLZ8kLy3CudLp/OxzchLngYQRGal3M6pPPI4nPD8d8cV HRMpz64BU01U6a3zzqRb0VHMNRSTeknYvn4NPh6GjomHykwvJ3saNuOQYTUjD400fK4N gyue4ssUqyBPdVQKcj+RI6cCh5Lv6K6lxlllI6NQtwPwWYVFTCHDu3z7HVnQY/gDgup3 6bM5H4VS9ER3WSJA/lg91GA56ZNnIpjzePearA2HuXnPDJPbN+uNCb9vqWNJLrVwJxrV jTqA== X-Gm-Message-State: ALoCoQmK2HD2TXhH3ljPxCmivw0phwEQqvUF6CCw4hqOV0oNp7EMt9mj3hI6MI11IQd0fjrSCebL X-Received: by 10.70.48.5 with SMTP id h5mr2247878pdn.125.1411151277660; Fri, 19 Sep 2014 11:27:57 -0700 (PDT) Received: from localhost.localdomain ([38.126.120.10]) by mx.google.com with ESMTPSA id ki1sm2495071pdb.59.2014.09.19.11.27.55 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 19 Sep 2014 11:27:57 -0700 (PDT) From: Ulf Hansson To: "Rafael J. Wysocki" , Len Brown , Pavel Machek , Greg Kroah-Hartman , linux-pm@vger.kernel.org Cc: linux-arm-kernel@lists.infradead.org, linux-acpi@vger.kernel.org, Geert Uytterhoeven , Kevin Hilman , Alan Stern , Daniel Lezcano , Tomasz Figa , devicetree@vger.kernel.org, Linus Walleij , Simon Horman , Magnus Damm , Ben Dooks , Kukjin Kim , Stephen Boyd , Philipp Zabel , Mark Brown , Wolfram Sang , Chris Ball , Russell King , Dmitry Torokhov , Ulf Hansson Subject: [PATCH v5 02/11] ACPI / PM: Assign the ->detach() callback when attaching the PM domain Date: Fri, 19 Sep 2014 20:27:35 +0200 Message-Id: <1411151264-16245-3-git-send-email-ulf.hansson@linaro.org> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1411151264-16245-1-git-send-email-ulf.hansson@linaro.org> References: <1411151264-16245-1-git-send-email-ulf.hansson@linaro.org> Sender: linux-acpi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-acpi@vger.kernel.org X-Spam-Status: No, score=-7.6 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP As as preparation to simplify the detachment of devices from their PM domains, we assign the ->detach() callback to genpd_dev_pm_detach(). Signed-off-by: Ulf Hansson --- drivers/acpi/device_pm.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/acpi/device_pm.c b/drivers/acpi/device_pm.c index 67075f8..eec5ed5 100644 --- a/drivers/acpi/device_pm.c +++ b/drivers/acpi/device_pm.c @@ -1072,6 +1072,8 @@ int acpi_dev_pm_attach(struct device *dev, bool power_on) acpi_dev_pm_full_power(adev); acpi_device_wakeup(adev, ACPI_STATE_S0, false); } + + dev->pm_domain->detach = acpi_dev_pm_detach; return 0; } EXPORT_SYMBOL_GPL(acpi_dev_pm_attach);