From patchwork Wed Sep 21 13:38:51 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ulf Hansson X-Patchwork-Id: 76686 Delivered-To: patches@linaro.org Received: by 10.140.106.72 with SMTP id d66csp2056356qgf; Wed, 21 Sep 2016 06:39:03 -0700 (PDT) X-Received: by 10.25.156.67 with SMTP id f64mr15285796lfe.29.1474465142949; Wed, 21 Sep 2016 06:39:02 -0700 (PDT) Return-Path: Received: from mail-lf0-x231.google.com (mail-lf0-x231.google.com. [2a00:1450:4010:c07::231]) by mx.google.com with ESMTPS id x202si8279320lfa.106.2016.09.21.06.39.02 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 21 Sep 2016 06:39:02 -0700 (PDT) Received-SPF: pass (google.com: domain of ulf.hansson@linaro.org designates 2a00:1450:4010:c07::231 as permitted sender) client-ip=2a00:1450:4010:c07::231; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org; spf=pass (google.com: domain of ulf.hansson@linaro.org designates 2a00:1450:4010:c07::231 as permitted sender) smtp.mailfrom=ulf.hansson@linaro.org; dmarc=pass (p=NONE dis=NONE) header.from=linaro.org Received: by mail-lf0-x231.google.com with SMTP id b71so14717553lfg.0 for ; Wed, 21 Sep 2016 06:39:02 -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; bh=RJVtzq77Kw6ou5kvFkUbkCZ93QiqvyCx0Q4OeYwNZIQ=; b=MtbCy/zRgfiRUDJpbkRNx5cVJh1oiDGipfXydsv4EU0xgS2Mg0ZS6qt9yzJK/112BK z7NhmScBI0JMFFvlmiVQWoJxGRwa3CUEC7aXybdPScsvO6LyASvYRjYzs8v7LBSfEzln UNfntw0DjFiVCQvq30VFfBS348BIEjWerFgg8= 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=RJVtzq77Kw6ou5kvFkUbkCZ93QiqvyCx0Q4OeYwNZIQ=; b=WUy8MQmgTqJZcMIxaKSviMDs45uI9fopzed6hSEf99NAE+adZvm4xv30+vKJwV4hXJ G/K2JUasI8sT1qdJEJidMzWnNuWXT2PMwRBSTP7qmpJZyGtwB8BmQa8t7XfnqID1HqCo 3x2O1TD0u31g2Qr5u+bYQ/AmUi3pSPbU7dypYgT8uYPp9zujXHUxu5FT5Uqfq0is6Om6 d02dmCrZDl5enEBgPOT2iYSjVw9D/CBP7plTnaKQLBXwMt40rWpLv8Tc3HycSL4AAPxi X1bbH0spWJM65a/oCpC1sVzW4H8xJQaVU0Eiu86ChBW3IheSJ2IdqGwgLqHqyVyYY+dp rDKw== X-Gm-Message-State: AE9vXwOIeZd6JQp32vcJ9JX2qEQX9BgHcq6i1YwECX6qC02jAxqi3NAb36Guc/5n1vE0hmlv+KE= X-Received: by 10.25.24.163 with SMTP id 35mr12125166lfy.176.1474465142476; Wed, 21 Sep 2016 06:39:02 -0700 (PDT) Return-Path: Received: from uffe-Latitude-E6430s.ideon.se ([85.235.10.227]) by smtp.gmail.com with ESMTPSA id s125sm6710569lja.14.2016.09.21.06.39.00 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 21 Sep 2016 06:39:01 -0700 (PDT) From: Ulf Hansson To: "Rafael J. Wysocki" , Kevin Hilman , Ulf Hansson , linux-pm@vger.kernel.org Cc: Len Brown , Pavel Machek , Geert Uytterhoeven , Lina Iyer , Jon Hunter Subject: [PATCH 2/4] PM / Domains: Remove redundant system PM callbacks Date: Wed, 21 Sep 2016 15:38:51 +0200 Message-Id: <1474465133-14865-3-git-send-email-ulf.hansson@linaro.org> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1474465133-14865-1-git-send-email-ulf.hansson@linaro.org> References: <1474465133-14865-1-git-send-email-ulf.hansson@linaro.org> In cases when the PM domain haven't assigned a system PM callback, the PM core fall-backs to check for the callback at the driver level instead. This makes it redundant to assign a pm_generic_* helper function to a corresponding system PM callback at a PM domain level. Therefore, let's remove these assignments in pm_genpd_init(). Signed-off-by: Ulf Hansson --- drivers/base/power/domain.c | 12 ------------ 1 file changed, 12 deletions(-) -- 1.9.1 diff --git a/drivers/base/power/domain.c b/drivers/base/power/domain.c index 63f0f8b..661ac3a 100644 --- a/drivers/base/power/domain.c +++ b/drivers/base/power/domain.c @@ -1316,24 +1316,12 @@ int pm_genpd_init(struct generic_pm_domain *genpd, genpd->domain.ops.runtime_suspend = genpd_runtime_suspend; genpd->domain.ops.runtime_resume = genpd_runtime_resume; genpd->domain.ops.prepare = pm_genpd_prepare; - genpd->domain.ops.suspend = pm_generic_suspend; - genpd->domain.ops.suspend_late = pm_generic_suspend_late; genpd->domain.ops.suspend_noirq = pm_genpd_suspend_noirq; genpd->domain.ops.resume_noirq = pm_genpd_resume_noirq; - genpd->domain.ops.resume_early = pm_generic_resume_early; - genpd->domain.ops.resume = pm_generic_resume; - genpd->domain.ops.freeze = pm_generic_freeze; - genpd->domain.ops.freeze_late = pm_generic_freeze_late; genpd->domain.ops.freeze_noirq = pm_genpd_freeze_noirq; genpd->domain.ops.thaw_noirq = pm_genpd_thaw_noirq; - genpd->domain.ops.thaw_early = pm_generic_thaw_early; - genpd->domain.ops.thaw = pm_generic_thaw; - genpd->domain.ops.poweroff = pm_generic_poweroff; - genpd->domain.ops.poweroff_late = pm_generic_poweroff_late; genpd->domain.ops.poweroff_noirq = pm_genpd_suspend_noirq; genpd->domain.ops.restore_noirq = pm_genpd_restore_noirq; - genpd->domain.ops.restore_early = pm_generic_restore_early; - genpd->domain.ops.restore = pm_generic_restore; genpd->domain.ops.complete = pm_genpd_complete; if (genpd->flags & GENPD_FLAG_PM_CLK) {