Skip to content

Commit

Permalink
Merge branch 'pm-fixes' of git://git.kernel.org/pub/scm/linux/kernel/…
Browse files Browse the repository at this point in the history
…git/rafael/suspend-2.6

* 'pm-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/suspend-2.6:
  PM / MIPS: Convert i8259.c to using syscore_ops
  • Loading branch information
torvalds committed Jul 17, 2011
2 parents 94b0522 + 84652e8 commit 247dc22
Showing 1 changed file with 6 additions and 16 deletions.
22 changes: 6 additions & 16 deletions arch/mips/kernel/i8259.c
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
#include <linux/interrupt.h>
#include <linux/kernel.h>
#include <linux/spinlock.h>
#include <linux/sysdev.h>
#include <linux/syscore_ops.h>
#include <linux/irq.h>

#include <asm/i8259.h>
Expand Down Expand Up @@ -215,14 +215,13 @@ static void mask_and_ack_8259A(struct irq_data *d)
}
}

static int i8259A_resume(struct sys_device *dev)
static void i8259A_resume(void)
{
if (i8259A_auto_eoi >= 0)
init_8259A(i8259A_auto_eoi);
return 0;
}

static int i8259A_shutdown(struct sys_device *dev)
static void i8259A_shutdown(void)
{
/* Put the i8259A into a quiescent state that
* the kernel initialization code can get it
Expand All @@ -232,26 +231,17 @@ static int i8259A_shutdown(struct sys_device *dev)
outb(0xff, PIC_MASTER_IMR); /* mask all of 8259A-1 */
outb(0xff, PIC_SLAVE_IMR); /* mask all of 8259A-1 */
}
return 0;
}

static struct sysdev_class i8259_sysdev_class = {
.name = "i8259",
static struct syscore_ops i8259_syscore_ops = {
.resume = i8259A_resume,
.shutdown = i8259A_shutdown,
};

static struct sys_device device_i8259A = {
.id = 0,
.cls = &i8259_sysdev_class,
};

static int __init i8259A_init_sysfs(void)
{
int error = sysdev_class_register(&i8259_sysdev_class);
if (!error)
error = sysdev_register(&device_i8259A);
return error;
register_syscore_ops(&i8259_syscore_ops);
return 0;
}

device_initcall(i8259A_init_sysfs);
Expand Down

0 comments on commit 247dc22

Please sign in to comment.