Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 104986
b: refs/heads/master
c: 876a425
h: refs/heads/master
v: v3
  • Loading branch information
Linus Torvalds committed Jul 23, 2008
1 parent 1b144c9 commit 28b8691
Show file tree
Hide file tree
Showing 5 changed files with 37 additions and 15 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: b22d8370061898f3029cdc2601fbdec493443f03
refs/heads/master: 876a4256d25b7fd7917f53e767da1ebdf3168457
8 changes: 8 additions & 0 deletions trunk/arch/um/include/init.h
Original file line number Diff line number Diff line change
Expand Up @@ -45,12 +45,20 @@ typedef void (*exitcall_t)(void);
# define __section(S) __attribute__ ((__section__(#S)))
#endif

#if __GNUC__ == 3

#if __GNUC_MINOR__ >= 3
# define __used __attribute__((__used__))
#else
# define __used __attribute__((__unused__))
#endif

#else
#if __GNUC__ == 4
# define __used __attribute__((__used__))
#endif
#endif

#else
#include <linux/compiler.h>
#endif
Expand Down
1 change: 0 additions & 1 deletion trunk/drivers/char/nvram.c
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,6 @@
#include <linux/init.h>
#include <linux/proc_fs.h>
#include <linux/spinlock.h>
#include <linux/smp_lock.h>

#include <asm/io.h>
#include <asm/uaccess.h>
Expand Down
2 changes: 1 addition & 1 deletion trunk/drivers/char/tty_io.c
Original file line number Diff line number Diff line change
Expand Up @@ -915,7 +915,7 @@ static void tty_reset_termios(struct tty_struct *tty)
* do_tty_hangup - actual handler for hangup events
* @work: tty device
*
k * This can be called by the "eventd" kernel thread. That is process
* This can be called by the "eventd" kernel thread. That is process
* synchronous but doesn't hold any locks, so we need to make sure we
* have the appropriate locks for what we're doing.
*
Expand Down
39 changes: 27 additions & 12 deletions trunk/kernel/irq/manage.c
Original file line number Diff line number Diff line change
Expand Up @@ -217,6 +217,17 @@ void enable_irq(unsigned int irq)
}
EXPORT_SYMBOL(enable_irq);

int set_irq_wake_real(unsigned int irq, unsigned int on)
{
struct irq_desc *desc = irq_desc + irq;
int ret = -ENXIO;

if (desc->chip->set_wake)
ret = desc->chip->set_wake(irq, on);

return ret;
}

/**
* set_irq_wake - control irq power management wakeup
* @irq: interrupt to control
Expand All @@ -233,30 +244,34 @@ int set_irq_wake(unsigned int irq, unsigned int on)
{
struct irq_desc *desc = irq_desc + irq;
unsigned long flags;
int ret = -ENXIO;
int (*set_wake)(unsigned, unsigned) = desc->chip->set_wake;
int ret = 0;

/* wakeup-capable irqs can be shared between drivers that
* don't need to have the same sleep mode behaviors.
*/
spin_lock_irqsave(&desc->lock, flags);
if (on) {
if (desc->wake_depth++ == 0)
desc->status |= IRQ_WAKEUP;
else
set_wake = NULL;
if (desc->wake_depth++ == 0) {
ret = set_irq_wake_real(irq, on);
if (ret)
desc->wake_depth = 0;
else
desc->status |= IRQ_WAKEUP;
}
} else {
if (desc->wake_depth == 0) {
printk(KERN_WARNING "Unbalanced IRQ %d "
"wake disable\n", irq);
WARN_ON(1);
} else if (--desc->wake_depth == 0)
desc->status &= ~IRQ_WAKEUP;
else
set_wake = NULL;
} else if (--desc->wake_depth == 0) {
ret = set_irq_wake_real(irq, on);
if (ret)
desc->wake_depth = 1;
else
desc->status &= ~IRQ_WAKEUP;
}
}
if (set_wake)
ret = desc->chip->set_wake(irq, on);

spin_unlock_irqrestore(&desc->lock, flags);
return ret;
}
Expand Down

0 comments on commit 28b8691

Please sign in to comment.