From patchwork Fri Apr 11 10:40:13 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Lezcano X-Patchwork-Id: 3967631 Return-Path: X-Original-To: patchwork-linux-samsung-soc@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 2E2A09F336 for ; Fri, 11 Apr 2014 10:40:30 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 557FC207F7 for ; Fri, 11 Apr 2014 10:40:29 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 7DA5E207F6 for ; Fri, 11 Apr 2014 10:40:28 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756632AbaDKKk0 (ORCPT ); Fri, 11 Apr 2014 06:40:26 -0400 Received: from mail-we0-f172.google.com ([74.125.82.172]:38774 "EHLO mail-we0-f172.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756741AbaDKKkW (ORCPT ); Fri, 11 Apr 2014 06:40:22 -0400 Received: by mail-we0-f172.google.com with SMTP id t61so5227875wes.17 for ; Fri, 11 Apr 2014 03:40:21 -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=Hnj8D06qHmMHaQrd3AYK9Pz1fFy41CZK96tXzFYeob8=; b=hcMQWAMpOYKqxD0lOVIdi1QaRCOX/VSREwuF9+IpnOYVAx5lNdcBe7tXxHs9hqr2W4 xXlmKQxM1jSCCqcy82lsBm1bDY1Y3r+5OuZIYFhKC/nN/ObJRlfoTXNywMpa4bHmZCZJ M25LSVd5oc19TPa9CuUkpMUfxB2m4GmG41uQMQxFVVmplPOmH8qC+MKrsegxnmm5jAPR EXCetzG7hyEBLmvulp4Ni1mGqDhce49Sevp+JvCzlqwFKD9lTg84wrFH5MwNwf8TF6/W d/Jmd6PdGx1Z/fOiys13VXmH40AS7tOi0YSiunAYx8TH50QWbWO47uyGOrvZnD5kpzQ1 yL3A== X-Gm-Message-State: ALoCoQmbaEekD0zQIpIOXOqaFWTqTlfyDtUhrkit5S3CLnFdd42ETlal7tZZ2rtU+U/+Debk1/Bq X-Received: by 10.180.37.110 with SMTP id x14mr2872616wij.52.1397212821510; Fri, 11 Apr 2014 03:40:21 -0700 (PDT) Received: from localhost.localdomain (AToulouse-654-1-377-242.w86-199.abo.wanadoo.fr. [86.199.232.242]) by mx.google.com with ESMTPSA id eq8sm3683033wib.16.2014.04.11.03.40.20 for (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 11 Apr 2014 03:40:20 -0700 (PDT) From: Daniel Lezcano To: kgene.kim@samsung.com Cc: linux-arm-kernel@lists.infradead.org, linux-samsung-soc@vger.kernel.org, t.figa@samsung.com, linaro-kernel@lists.linaro.org, rjw@rjwysocki.net Subject: [PATCH V5 18/20] ARM: exynos: cpuidle: Pass the AFTR callback to the platform_data Date: Fri, 11 Apr 2014 12:40:13 +0200 Message-Id: <1397212815-16068-19-git-send-email-daniel.lezcano@linaro.org> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1397212815-16068-1-git-send-email-daniel.lezcano@linaro.org> References: <1397212815-16068-1-git-send-email-daniel.lezcano@linaro.org> Sender: linux-samsung-soc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-samsung-soc@vger.kernel.org X-Spam-Status: No, score=-7.3 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 No more dependency on the arch code. The platform_data field is used to set the PM callback as the other cpuidle drivers. Signed-off-by: Daniel Lezcano Reviewed-by: Viresh Kumar Reviewed-by: Bartlomiej Zolnierkiewicz --- arch/arm/mach-exynos/cpuidle.c | 4 +++- arch/arm/mach-exynos/exynos.c | 5 +++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/arch/arm/mach-exynos/cpuidle.c b/arch/arm/mach-exynos/cpuidle.c index 02609ac..1d1222e 100644 --- a/arch/arm/mach-exynos/cpuidle.c +++ b/arch/arm/mach-exynos/cpuidle.c @@ -27,7 +27,7 @@ #include -#include "common.h" +static void (*exynos_enter_aftr)(void); static int idle_finisher(unsigned long flags) { @@ -86,6 +86,8 @@ static int exynos_cpuidle_probe(struct platform_device *pdev) { int ret; + exynos_enter_aftr = (void *)(pdev->dev.platform_data); + ret = cpuidle_register(&exynos_idle_driver, NULL); if (ret) { dev_err(&pdev->dev, "failed to register cpuidle driver\n"); diff --git a/arch/arm/mach-exynos/exynos.c b/arch/arm/mach-exynos/exynos.c index fe8dac8..d22f0e4 100644 --- a/arch/arm/mach-exynos/exynos.c +++ b/arch/arm/mach-exynos/exynos.c @@ -221,8 +221,9 @@ void exynos_restart(enum reboot_mode mode, const char *cmd) } static struct platform_device exynos_cpuidle = { - .name = "exynos_cpuidle", - .id = -1, + .name = "exynos_cpuidle", + .dev.platform_data = exynos_enter_aftr, + .id = -1, }; void __init exynos_cpuidle_init(void)