diff options
| -rw-r--r-- | arch/powerpc/kernel/traps.c | 31 |
1 files changed, 20 insertions, 11 deletions
diff --git a/arch/powerpc/kernel/traps.c b/arch/powerpc/kernel/traps.c index 23f43b44bba6..6297da743db9 100644 --- a/arch/powerpc/kernel/traps.c +++ b/arch/powerpc/kernel/traps.c | |||
| @@ -90,6 +90,24 @@ EXPORT_SYMBOL(unregister_die_notifier); | |||
| 90 | * Trap & Exception support | 90 | * Trap & Exception support |
| 91 | */ | 91 | */ |
| 92 | 92 | ||
| 93 | #ifdef CONFIG_PMAC_BACKLIGHT | ||
| 94 | static void pmac_backlight_unblank(void) | ||
| 95 | { | ||
| 96 | mutex_lock(&pmac_backlight_mutex); | ||
| 97 | if (pmac_backlight) { | ||
| 98 | struct backlight_properties *props; | ||
| 99 | |||
| 100 | props = &pmac_backlight->props; | ||
| 101 | props->brightness = props->max_brightness; | ||
| 102 | props->power = FB_BLANK_UNBLANK; | ||
| 103 | backlight_update_status(pmac_backlight); | ||
| 104 | } | ||
| 105 | mutex_unlock(&pmac_backlight_mutex); | ||
| 106 | } | ||
| 107 | #else | ||
| 108 | static inline void pmac_backlight_unblank(void) { } | ||
| 109 | #endif | ||
| 110 | |||
| 93 | static DEFINE_SPINLOCK(die_lock); | 111 | static DEFINE_SPINLOCK(die_lock); |
| 94 | 112 | ||
| 95 | int die(const char *str, struct pt_regs *regs, long err) | 113 | int die(const char *str, struct pt_regs *regs, long err) |
| @@ -104,18 +122,9 @@ int die(const char *str, struct pt_regs *regs, long err) | |||
| 104 | console_verbose(); | 122 | console_verbose(); |
| 105 | spin_lock_irq(&die_lock); | 123 | spin_lock_irq(&die_lock); |
| 106 | bust_spinlocks(1); | 124 | bust_spinlocks(1); |
| 107 | #ifdef CONFIG_PMAC_BACKLIGHT | 125 | if (machine_is(powermac)) |
| 108 | mutex_lock(&pmac_backlight_mutex); | 126 | pmac_backlight_unblank(); |
| 109 | if (machine_is(powermac) && pmac_backlight) { | ||
| 110 | struct backlight_properties *props; | ||
| 111 | 127 | ||
| 112 | props = &pmac_backlight->props; | ||
| 113 | props->brightness = props->max_brightness; | ||
| 114 | props->power = FB_BLANK_UNBLANK; | ||
| 115 | backlight_update_status(pmac_backlight); | ||
| 116 | } | ||
| 117 | mutex_unlock(&pmac_backlight_mutex); | ||
| 118 | #endif | ||
| 119 | printk("Oops: %s, sig: %ld [#%d]\n", str, err, ++die_counter); | 128 | printk("Oops: %s, sig: %ld [#%d]\n", str, err, ++die_counter); |
| 120 | #ifdef CONFIG_PREEMPT | 129 | #ifdef CONFIG_PREEMPT |
| 121 | printk("PREEMPT "); | 130 | printk("PREEMPT "); |
