From patchwork Sun Apr 17 21:10:02 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rafael Wysocki X-Patchwork-Id: 713931 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter1.kernel.org (8.14.4/8.14.3) with ESMTP id p3HLJ0qQ029279 for ; Sun, 17 Apr 2011 21:19:00 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753534Ab1DQVS5 (ORCPT ); Sun, 17 Apr 2011 17:18:57 -0400 Received: from ogre.sisk.pl ([217.79.144.158]:57718 "EHLO ogre.sisk.pl" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753629Ab1DQVQp (ORCPT ); Sun, 17 Apr 2011 17:16:45 -0400 Received: from localhost (localhost.localdomain [127.0.0.1]) by ogre.sisk.pl (Postfix) with ESMTP id 107B71AC17B; Sun, 17 Apr 2011 23:17:32 +0200 (CEST) Received: from ogre.sisk.pl ([127.0.0.1]) by localhost (ogre.sisk.pl [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 27662-06; Sun, 17 Apr 2011 23:16:38 +0200 (CEST) Received: from ferrari.rjw.lan (220-bem-13.acn.waw.pl [82.210.184.220]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by ogre.sisk.pl (Postfix) with ESMTP id ED52E1AC190; Sun, 17 Apr 2011 23:16:08 +0200 (CEST) From: "Rafael J. Wysocki" To: LKML Subject: [PATCH 6/14] ARM / SA1100: Use struct syscore_ops for "core" power management Date: Sun, 17 Apr 2011 23:10:02 +0200 User-Agent: KMail/1.13.6 (Linux/2.6.39-rc3+; KDE/4.6.0; x86_64; ; ) Cc: Greg KH , Kay Sievers , Linux PM mailing list , Russell King , linux-omap@vger.kernel.org, Kevin Hilman , linux-arm-kernel@lists.infradead.org, Ben Dooks , Mike Frysinger , Ralf Baechle , "Hans-Christian Egtvedt" , Guan Xuetao , Benjamin Herrenschmidt , linuxppc-dev@lists.ozlabs.org, Jiri Kosina , Konrad Rzeszutek Wilk , Jeremy Fitzhardinge References: <201103280125.11750.rjw@sisk.pl> <201104172301.54115.rjw@sisk.pl> In-Reply-To: <201104172301.54115.rjw@sisk.pl> MIME-Version: 1.0 Message-Id: <201104172310.02794.rjw@sisk.pl> X-Virus-Scanned: amavisd-new at ogre.sisk.pl using MkS_Vir for Linux Sender: linux-omap-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.6 (demeter1.kernel.org [140.211.167.41]); Sun, 17 Apr 2011 21:19:00 +0000 (UTC) From: Rafael J. Wysocki Replace the sysdev class and struct sys_device used for power management by the SA1100 interrupt-handling code with a struct syscore_ops object which is simpler. Signed-off-by: Rafael J. Wysocki --- arch/arm/mach-sa1100/irq.c | 19 ++++++------------- 1 file changed, 6 insertions(+), 13 deletions(-) -- To unsubscribe from this list: send the line "unsubscribe linux-omap" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Index: linux-2.6/arch/arm/mach-sa1100/irq.c =================================================================== --- linux-2.6.orig/arch/arm/mach-sa1100/irq.c +++ linux-2.6/arch/arm/mach-sa1100/irq.c @@ -14,7 +14,7 @@ #include #include #include -#include +#include #include #include @@ -234,7 +234,7 @@ static struct sa1100irq_state { unsigned int iccr; } sa1100irq_state; -static int sa1100irq_suspend(struct sys_device *dev, pm_message_t state) +static int sa1100irq_suspend(void) { struct sa1100irq_state *st = &sa1100irq_state; @@ -264,7 +264,7 @@ static int sa1100irq_suspend(struct sys_ return 0; } -static int sa1100irq_resume(struct sys_device *dev) +static void sa1100irq_resume(void) { struct sa1100irq_state *st = &sa1100irq_state; @@ -277,24 +277,17 @@ static int sa1100irq_resume(struct sys_d ICMR = st->icmr; } - return 0; } -static struct sysdev_class sa1100irq_sysclass = { - .name = "sa11x0-irq", +static struct syscore_ops sa1100irq_syscore_ops = { .suspend = sa1100irq_suspend, .resume = sa1100irq_resume, }; -static struct sys_device sa1100irq_device = { - .id = 0, - .cls = &sa1100irq_sysclass, -}; - static int __init sa1100irq_init_devicefs(void) { - sysdev_class_register(&sa1100irq_sysclass); - return sysdev_register(&sa1100irq_device); + register_syscore_ops(&sa1100irq_syscore_ops); + return 0; } device_initcall(sa1100irq_init_devicefs);