~ubuntu-branches/ubuntu/precise/linux-ti-omap4/precise

« back to all changes in this revision

Viewing changes to arch/ia64/hp/sim/hpsim_irq.c

  • Committer: Bazaar Package Importer
  • Author(s): Paolo Pisati
  • Date: 2011-06-29 15:23:51 UTC
  • mfrom: (26.1.1 natty-proposed)
  • Revision ID: james.westby@ubuntu.com-20110629152351-xs96tm303d95rpbk
Tags: 3.0.0-1200.2
* Rebased against 3.0.0-6.7
* BSP from TI based on 3.0.0

Show diffs side-by-side

added added

removed removed

Lines of Context:
11
11
#include <linux/irq.h>
12
12
 
13
13
static unsigned int
14
 
hpsim_irq_startup (unsigned int irq)
 
14
hpsim_irq_startup(struct irq_data *data)
15
15
{
16
16
        return 0;
17
17
}
18
18
 
19
19
static void
20
 
hpsim_irq_noop (unsigned int irq)
 
20
hpsim_irq_noop(struct irq_data *data)
21
21
{
22
22
}
23
23
 
24
24
static int
25
 
hpsim_set_affinity_noop(unsigned int a, const struct cpumask *b)
 
25
hpsim_set_affinity_noop(struct irq_data *d, const struct cpumask *b, bool f)
26
26
{
27
27
        return 0;
28
28
}
29
29
 
30
30
static struct irq_chip irq_type_hp_sim = {
31
 
        .name =         "hpsim",
32
 
        .startup =      hpsim_irq_startup,
33
 
        .shutdown =     hpsim_irq_noop,
34
 
        .enable =       hpsim_irq_noop,
35
 
        .disable =      hpsim_irq_noop,
36
 
        .ack =          hpsim_irq_noop,
37
 
        .end =          hpsim_irq_noop,
38
 
        .set_affinity = hpsim_set_affinity_noop,
 
31
        .name =                 "hpsim",
 
32
        .irq_startup =          hpsim_irq_startup,
 
33
        .irq_shutdown =         hpsim_irq_noop,
 
34
        .irq_enable =           hpsim_irq_noop,
 
35
        .irq_disable =          hpsim_irq_noop,
 
36
        .irq_ack =              hpsim_irq_noop,
 
37
        .irq_set_affinity =     hpsim_set_affinity_noop,
39
38
};
40
39
 
41
40
void __init
42
41
hpsim_irq_init (void)
43
42
{
44
 
        struct irq_desc *idesc;
45
43
        int i;
46
44
 
47
 
        for (i = 0; i < NR_IRQS; ++i) {
48
 
                idesc = irq_desc + i;
49
 
                if (idesc->chip == &no_irq_chip)
50
 
                        idesc->chip = &irq_type_hp_sim;
 
45
        for_each_active_irq(i) {
 
46
                struct irq_chip *chip = irq_get_chip(i);
 
47
 
 
48
                if (chip == &no_irq_chip)
 
49
                        irq_set_chip(i, &irq_type_hp_sim);
51
50
        }
52
51
}