forked from luck/tmp_suning_uos_patched
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>
This commit is contained in:
parent
b780805614
commit
905339807b
|
@ -14,7 +14,7 @@
|
||||||
#include <linux/interrupt.h>
|
#include <linux/interrupt.h>
|
||||||
#include <linux/irq.h>
|
#include <linux/irq.h>
|
||||||
#include <linux/ioport.h>
|
#include <linux/ioport.h>
|
||||||
#include <linux/sysdev.h>
|
#include <linux/syscore_ops.h>
|
||||||
|
|
||||||
#include <mach/hardware.h>
|
#include <mach/hardware.h>
|
||||||
#include <asm/mach/irq.h>
|
#include <asm/mach/irq.h>
|
||||||
|
@ -234,7 +234,7 @@ static struct sa1100irq_state {
|
||||||
unsigned int iccr;
|
unsigned int iccr;
|
||||||
} sa1100irq_state;
|
} 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;
|
struct sa1100irq_state *st = &sa1100irq_state;
|
||||||
|
|
||||||
|
@ -264,7 +264,7 @@ static int sa1100irq_suspend(struct sys_device *dev, pm_message_t state)
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int sa1100irq_resume(struct sys_device *dev)
|
static void sa1100irq_resume(void)
|
||||||
{
|
{
|
||||||
struct sa1100irq_state *st = &sa1100irq_state;
|
struct sa1100irq_state *st = &sa1100irq_state;
|
||||||
|
|
||||||
|
@ -277,24 +277,17 @@ static int sa1100irq_resume(struct sys_device *dev)
|
||||||
|
|
||||||
ICMR = st->icmr;
|
ICMR = st->icmr;
|
||||||
}
|
}
|
||||||
return 0;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static struct sysdev_class sa1100irq_sysclass = {
|
static struct syscore_ops sa1100irq_syscore_ops = {
|
||||||
.name = "sa11x0-irq",
|
|
||||||
.suspend = sa1100irq_suspend,
|
.suspend = sa1100irq_suspend,
|
||||||
.resume = sa1100irq_resume,
|
.resume = sa1100irq_resume,
|
||||||
};
|
};
|
||||||
|
|
||||||
static struct sys_device sa1100irq_device = {
|
|
||||||
.id = 0,
|
|
||||||
.cls = &sa1100irq_sysclass,
|
|
||||||
};
|
|
||||||
|
|
||||||
static int __init sa1100irq_init_devicefs(void)
|
static int __init sa1100irq_init_devicefs(void)
|
||||||
{
|
{
|
||||||
sysdev_class_register(&sa1100irq_sysclass);
|
register_syscore_ops(&sa1100irq_syscore_ops);
|
||||||
return sysdev_register(&sa1100irq_device);
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
device_initcall(sa1100irq_init_devicefs);
|
device_initcall(sa1100irq_init_devicefs);
|
||||||
|
|
Loading…
Reference in New Issue
Block a user