diff options
author | Rafael J. Wysocki <rjw@sisk.pl> | 2011-07-15 18:59:54 -0400 |
---|---|---|
committer | Rafael J. Wysocki <rjw@sisk.pl> | 2011-07-15 18:59:54 -0400 |
commit | 84652e834b11d1d279e9073a94b320c85707a880 (patch) | |
tree | f7d1650c5e88ee3a55100e9a367835ae75f2c646 /arch/mips/kernel | |
parent | 3110df800c4de2724624d46e6bed27efc5e9a707 (diff) |
PM / MIPS: Convert i8259.c to using syscore_ops
The code in arch/mips/kernel/i8259.c still hasn't been converted to
using struct syscore_ops instead of a sysdev for resume and shutdown.
As a result, this code doesn't build any more after suspend, resume
and shutdown callbacks have been removed from struct sysdev_class.
Fix this problem by converting i8259.c to using syscore_ops.
Reported-and-tested-by: Roland Vossen <rvossen@broadcom.com>
Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
Acked-by: Ralf Baechle <ralf@linux-mips.org>
Diffstat (limited to 'arch/mips/kernel')
-rw-r--r-- | arch/mips/kernel/i8259.c | 22 |
1 files changed, 6 insertions, 16 deletions
diff --git a/arch/mips/kernel/i8259.c b/arch/mips/kernel/i8259.c index c018696765d4..5c74eb797f08 100644 --- a/arch/mips/kernel/i8259.c +++ b/arch/mips/kernel/i8259.c | |||
@@ -14,7 +14,7 @@ | |||
14 | #include <linux/interrupt.h> | 14 | #include <linux/interrupt.h> |
15 | #include <linux/kernel.h> | 15 | #include <linux/kernel.h> |
16 | #include <linux/spinlock.h> | 16 | #include <linux/spinlock.h> |
17 | #include <linux/sysdev.h> | 17 | #include <linux/syscore_ops.h> |
18 | #include <linux/irq.h> | 18 | #include <linux/irq.h> |
19 | 19 | ||
20 | #include <asm/i8259.h> | 20 | #include <asm/i8259.h> |
@@ -215,14 +215,13 @@ spurious_8259A_irq: | |||
215 | } | 215 | } |
216 | } | 216 | } |
217 | 217 | ||
218 | static int i8259A_resume(struct sys_device *dev) | 218 | static void i8259A_resume(void) |
219 | { | 219 | { |
220 | if (i8259A_auto_eoi >= 0) | 220 | if (i8259A_auto_eoi >= 0) |
221 | init_8259A(i8259A_auto_eoi); | 221 | init_8259A(i8259A_auto_eoi); |
222 | return 0; | ||
223 | } | 222 | } |
224 | 223 | ||
225 | static int i8259A_shutdown(struct sys_device *dev) | 224 | static void i8259A_shutdown(void) |
226 | { | 225 | { |
227 | /* Put the i8259A into a quiescent state that | 226 | /* Put the i8259A into a quiescent state that |
228 | * the kernel initialization code can get it | 227 | * the kernel initialization code can get it |
@@ -232,26 +231,17 @@ static int i8259A_shutdown(struct sys_device *dev) | |||
232 | outb(0xff, PIC_MASTER_IMR); /* mask all of 8259A-1 */ | 231 | outb(0xff, PIC_MASTER_IMR); /* mask all of 8259A-1 */ |
233 | outb(0xff, PIC_SLAVE_IMR); /* mask all of 8259A-1 */ | 232 | outb(0xff, PIC_SLAVE_IMR); /* mask all of 8259A-1 */ |
234 | } | 233 | } |
235 | return 0; | ||
236 | } | 234 | } |
237 | 235 | ||
238 | static struct sysdev_class i8259_sysdev_class = { | 236 | static struct syscore_ops i8259_syscore_ops = { |
239 | .name = "i8259", | ||
240 | .resume = i8259A_resume, | 237 | .resume = i8259A_resume, |
241 | .shutdown = i8259A_shutdown, | 238 | .shutdown = i8259A_shutdown, |
242 | }; | 239 | }; |
243 | 240 | ||
244 | static struct sys_device device_i8259A = { | ||
245 | .id = 0, | ||
246 | .cls = &i8259_sysdev_class, | ||
247 | }; | ||
248 | |||
249 | static int __init i8259A_init_sysfs(void) | 241 | static int __init i8259A_init_sysfs(void) |
250 | { | 242 | { |
251 | int error = sysdev_class_register(&i8259_sysdev_class); | 243 | register_syscore_ops(&i8259_syscore_ops); |
252 | if (!error) | 244 | return 0; |
253 | error = sysdev_register(&device_i8259A); | ||
254 | return error; | ||
255 | } | 245 | } |
256 | 246 | ||
257 | device_initcall(i8259A_init_sysfs); | 247 | device_initcall(i8259A_init_sysfs); |