Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

+6 -13
+6 -13
arch/arm/mach-sa1100/irq.c
··· 14 14 #include <linux/interrupt.h> 15 15 #include <linux/irq.h> 16 16 #include <linux/ioport.h> 17 - #include <linux/sysdev.h> 17 + #include <linux/syscore_ops.h> 18 18 19 19 #include <mach/hardware.h> 20 20 #include <asm/mach/irq.h> ··· 234 234 unsigned int iccr; 235 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 239 struct sa1100irq_state *st = &sa1100irq_state; 240 240 ··· 264 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 269 struct sa1100irq_state *st = &sa1100irq_state; 270 270 ··· 277 277 278 278 ICMR = st->icmr; 279 279 } 280 - return 0; 281 280 } 282 281 283 - static struct sysdev_class sa1100irq_sysclass = { 284 - .name = "sa11x0-irq", 282 + static struct syscore_ops sa1100irq_syscore_ops = { 285 283 .suspend = sa1100irq_suspend, 286 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 287 static int __init sa1100irq_init_devicefs(void) 295 288 { 296 - sysdev_class_register(&sa1100irq_sysclass); 297 - return sysdev_register(&sa1100irq_device); 289 + register_syscore_ops(&sa1100irq_syscore_ops); 290 + return 0; 298 291 } 299 292 300 293 device_initcall(sa1100irq_init_devicefs);