Gitweb: http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=6031d9d9ad905b514bf45572bd1877fe6b5145ab Commit: 6031d9d9ad905b514bf45572bd1877fe6b5145ab Parent: 293e4688fe2fec87fccf84a3b1100b27191424e9 Author: [EMAIL PROTECTED] <[EMAIL PROTECTED]> AuthorDate: Tue Mar 20 20:38:12 2007 -0500 Committer: Paul Mackerras <[EMAIL PROTECTED]> CommitDate: Mon Mar 26 12:34:29 2007 +1000
[POWERPC] Clean up pmac_backlight_unblank in oops path Move pmac_backlight_unblank into its own function and only take the pmac_backlight_mutex when we are on a pmac for that added bit of paranoia. Signed-off-by: Anton Blanchard <[EMAIL PROTECTED]> Signed-off-by: Paul Mackerras <[EMAIL PROTECTED]> --- 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 23f43b4..6297da7 100644 --- a/arch/powerpc/kernel/traps.c +++ b/arch/powerpc/kernel/traps.c @@ -90,6 +90,24 @@ EXPORT_SYMBOL(unregister_die_notifier); * Trap & Exception support */ +#ifdef CONFIG_PMAC_BACKLIGHT +static void pmac_backlight_unblank(void) +{ + mutex_lock(&pmac_backlight_mutex); + if (pmac_backlight) { + struct backlight_properties *props; + + props = &pmac_backlight->props; + props->brightness = props->max_brightness; + props->power = FB_BLANK_UNBLANK; + backlight_update_status(pmac_backlight); + } + mutex_unlock(&pmac_backlight_mutex); +} +#else +static inline void pmac_backlight_unblank(void) { } +#endif + static DEFINE_SPINLOCK(die_lock); 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) console_verbose(); spin_lock_irq(&die_lock); bust_spinlocks(1); -#ifdef CONFIG_PMAC_BACKLIGHT - mutex_lock(&pmac_backlight_mutex); - if (machine_is(powermac) && pmac_backlight) { - struct backlight_properties *props; + if (machine_is(powermac)) + pmac_backlight_unblank(); - props = &pmac_backlight->props; - props->brightness = props->max_brightness; - props->power = FB_BLANK_UNBLANK; - backlight_update_status(pmac_backlight); - } - mutex_unlock(&pmac_backlight_mutex); -#endif printk("Oops: %s, sig: %ld [#%d]\n", str, err, ++die_counter); #ifdef CONFIG_PREEMPT printk("PREEMPT "); - To unsubscribe from this list: send the line "unsubscribe git-commits-head" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html