From patchwork Thu Apr 10 09:55:49 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Lezcano X-Patchwork-Id: 28150 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-qg0-f71.google.com (mail-qg0-f71.google.com [209.85.192.71]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 888A420671 for ; Thu, 10 Apr 2014 09:56:13 +0000 (UTC) Received: by mail-qg0-f71.google.com with SMTP id j5sf6948832qga.2 for ; Thu, 10 Apr 2014 02:56:13 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:delivered-to:from:to:cc:subject :date:message-id:in-reply-to:references:sender:precedence:list-id :x-original-sender:x-original-authentication-results:mailing-list :list-post:list-help:list-archive:list-unsubscribe; bh=o89SY+tuW44E6zF0lA50t/lEUO1y6+nPBmEF3/44fhM=; b=ATK+AYoZk5xh5/cH92lXwcms2wvYdHlghkeKUU4l9R3sF5Hnk+yxhGgDt+iIV0sGRi iWAYeV+29Qn/8EgG4G4Hg4R0jO/BN2BEXltBElNHwCR4qCCjnDa0h8sspzbOx9kWXT9q 4tWoUeZqeats7Vh7AIpk2GYZDnRmnu09bY0vjPWgbuDkcpZ4p8O0Cn2/yVQf9ECPMVob asSDCNPqRTJ1HqpieUgdVBlcrZYkOYX8Tf5dDphDv+Kv7Ay3G55ZeW+ChrTY+oI6dh9c vD0y/n8/BRry6INmLfWXgBqcCqXGhSd/lPTOOrc725xPDk/V0VKZqWuy2s+Xo+i17Ywe qmOg== X-Gm-Message-State: ALoCoQlqpAKXMpdTdPxFxQPh4ff27jX4Z73Iz0oW+diH1d6aXv0RbnTej3zl15ioVpB4feRwxNCw X-Received: by 10.236.17.161 with SMTP id j21mr6219618yhj.55.1397123773328; Thu, 10 Apr 2014 02:56:13 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.100.137 with SMTP id s9ls1099573qge.57.gmail; Thu, 10 Apr 2014 02:56:13 -0700 (PDT) X-Received: by 10.58.1.97 with SMTP id 1mr693391vel.23.1397123773215; Thu, 10 Apr 2014 02:56:13 -0700 (PDT) Received: from mail-vc0-f174.google.com (mail-vc0-f174.google.com [209.85.220.174]) by mx.google.com with ESMTPS id ya4si605957vec.163.2014.04.10.02.56.13 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 10 Apr 2014 02:56:13 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.220.174 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) client-ip=209.85.220.174; Received: by mail-vc0-f174.google.com with SMTP id ld13so3214492vcb.33 for ; Thu, 10 Apr 2014 02:56:13 -0700 (PDT) X-Received: by 10.52.161.168 with SMTP id xt8mr11469455vdb.23.1397123773127; Thu, 10 Apr 2014 02:56:13 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.220.221.72 with SMTP id ib8csp45063vcb; Thu, 10 Apr 2014 02:56:12 -0700 (PDT) X-Received: by 10.68.235.6 with SMTP id ui6mr18224476pbc.45.1397123772239; Thu, 10 Apr 2014 02:56:12 -0700 (PDT) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id xe4si1873677pbc.456.2014.04.10.02.56.11; Thu, 10 Apr 2014 02:56:11 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-samsung-soc-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S965677AbaDJJ4J (ORCPT + 9 others); Thu, 10 Apr 2014 05:56:09 -0400 Received: from mail-wg0-f47.google.com ([74.125.82.47]:43525 "EHLO mail-wg0-f47.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S965683AbaDJJ4A (ORCPT ); Thu, 10 Apr 2014 05:56:00 -0400 Received: by mail-wg0-f47.google.com with SMTP id x12so3668552wgg.18 for ; Thu, 10 Apr 2014 02:55:58 -0700 (PDT) X-Received: by 10.194.205.35 with SMTP id ld3mr196691wjc.82.1397123758880; Thu, 10 Apr 2014 02:55:58 -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 hu7sm15690125wib.10.2014.04.10.02.55.57 for (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 10 Apr 2014 02:55:57 -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, b.zolnierkie@samsung.com, sachin.kamat@linaro.org, viresh.kumar@linaro.org, rjw@rjwysocki.net Subject: [PATCH V4 18/20] ARM: exynos: cpuidle: Pass the AFTR callback to the platform_data Date: Thu, 10 Apr 2014 11:55:49 +0200 Message-Id: <1397123751-1957-19-git-send-email-daniel.lezcano@linaro.org> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1397123751-1957-1-git-send-email-daniel.lezcano@linaro.org> References: <1397123751-1957-1-git-send-email-daniel.lezcano@linaro.org> Sender: linux-samsung-soc-owner@vger.kernel.org Precedence: list List-ID: X-Mailing-List: linux-samsung-soc@vger.kernel.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: daniel.lezcano@linaro.org X-Original-Authentication-Results: mx.google.com; spf=neutral (google.com: 209.85.220.174 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , 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 0651293..ef592ad 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)