diff options
author | Rafael J. Wysocki <rjw@sisk.pl> | 2011-04-22 16:03:03 -0400 |
---|---|---|
committer | Rafael J. Wysocki <rjw@sisk.pl> | 2011-04-24 13:16:09 -0400 |
commit | 905339807bde7bb726001b69fbdf69ab0cf69a9e (patch) | |
tree | 09aa313cf2fb0ca7eb23c0a9243d3ff8efa5d301 | |
parent | b7808056141bc4d67213036921a5a685ebec0274 (diff) |
ARM / SA1100: Use struct syscore_ops for "core" power management
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 <rjw@sisk.pl>
Acked-by: Greg Kroah-Hartman <gregkh@suse.de>
-rw-r--r-- | arch/arm/mach-sa1100/irq.c | 19 |
1 files changed, 6 insertions, 13 deletions
diff --git a/arch/arm/mach-sa1100/irq.c b/arch/arm/mach-sa1100/irq.c index 423ddb3d65e9..dfbf824a69fa 100644 --- a/arch/arm/mach-sa1100/irq.c +++ b/arch/arm/mach-sa1100/irq.c | |||
@@ -14,7 +14,7 @@ | |||
14 | #include <linux/interrupt.h> | 14 | #include <linux/interrupt.h> |
15 | #include <linux/irq.h> | 15 | #include <linux/irq.h> |
16 | #include <linux/ioport.h> | 16 | #include <linux/ioport.h> |
17 | #include <linux/sysdev.h> | 17 | #include <linux/syscore_ops.h> |
18 | 18 | ||
19 | #include <mach/hardware.h> | 19 | #include <mach/hardware.h> |
20 | #include <asm/mach/irq.h> | 20 | #include <asm/mach/irq.h> |
@@ -234,7 +234,7 @@ static struct sa1100irq_state { | |||
234 | unsigned int iccr; | 234 | unsigned int iccr; |
235 | } sa1100irq_state; | 235 | } sa1100irq_state; |
236 | 236 | ||
237 | static int sa1100irq_suspend(struct sys_device *dev, pm_message_t state) | 237 | static int sa1100irq_suspend(void) |
238 | { | 238 | { |
239 | struct sa1100irq_state *st = &sa1100irq_state; | 239 | struct sa1100irq_state *st = &sa1100irq_state; |
240 | 240 | ||
@@ -264,7 +264,7 @@ static int sa1100irq_suspend(struct sys_device *dev, pm_message_t state) | |||
264 | return 0; | 264 | return 0; |
265 | } | 265 | } |
266 | 266 | ||
267 | static int sa1100irq_resume(struct sys_device *dev) | 267 | static void sa1100irq_resume(void) |
268 | { | 268 | { |
269 | struct sa1100irq_state *st = &sa1100irq_state; | 269 | struct sa1100irq_state *st = &sa1100irq_state; |
270 | 270 | ||
@@ -277,24 +277,17 @@ static int sa1100irq_resume(struct sys_device *dev) | |||
277 | 277 | ||
278 | ICMR = st->icmr; | 278 | ICMR = st->icmr; |
279 | } | 279 | } |
280 | return 0; | ||
281 | } | 280 | } |
282 | 281 | ||
283 | static struct sysdev_class sa1100irq_sysclass = { | 282 | static struct syscore_ops sa1100irq_syscore_ops = { |
284 | .name = "sa11x0-irq", | ||
285 | .suspend = sa1100irq_suspend, | 283 | .suspend = sa1100irq_suspend, |
286 | .resume = sa1100irq_resume, | 284 | .resume = sa1100irq_resume, |
287 | }; | 285 | }; |
288 | 286 | ||
289 | static struct sys_device sa1100irq_device = { | ||
290 | .id = 0, | ||
291 | .cls = &sa1100irq_sysclass, | ||
292 | }; | ||
293 | |||
294 | static int __init sa1100irq_init_devicefs(void) | 287 | static int __init sa1100irq_init_devicefs(void) |
295 | { | 288 | { |
296 | sysdev_class_register(&sa1100irq_sysclass); | 289 | register_syscore_ops(&sa1100irq_syscore_ops); |
297 | return sysdev_register(&sa1100irq_device); | 290 | return 0; |
298 | } | 291 | } |
299 | 292 | ||
300 | device_initcall(sa1100irq_init_devicefs); | 293 | device_initcall(sa1100irq_init_devicefs); |