diff options
author | Yinghai Lu <yinghai@kernel.org> | 2009-01-03 03:06:34 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2009-01-03 15:01:23 -0500 |
commit | 2f983570010a0dcb26d988da02d7ccfad00c807c (patch) | |
tree | 39fd89fd04d940306c02425927fc1308b26357b0 /drivers | |
parent | e9e67a8b579d9605a3d06f7430dbb40465c97bf1 (diff) |
sparseirq: move set/get_timer_rand_state back to .c
those two functions only used in that C file
Signed-off-by: Yinghai Lu <yinghai@kernel.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/char/random.c | 40 |
1 files changed, 34 insertions, 6 deletions
diff --git a/drivers/char/random.c b/drivers/char/random.c index d26891bfcd41..c7afc068c28d 100644 --- a/drivers/char/random.c +++ b/drivers/char/random.c | |||
@@ -559,7 +559,40 @@ struct timer_rand_state { | |||
559 | }; | 559 | }; |
560 | 560 | ||
561 | #ifndef CONFIG_SPARSE_IRQ | 561 | #ifndef CONFIG_SPARSE_IRQ |
562 | struct timer_rand_state *irq_timer_state[NR_IRQS]; | 562 | |
563 | static struct timer_rand_state *irq_timer_state[NR_IRQS]; | ||
564 | |||
565 | static struct timer_rand_state *get_timer_rand_state(unsigned int irq) | ||
566 | { | ||
567 | return irq_timer_state[irq]; | ||
568 | } | ||
569 | |||
570 | static void set_timer_rand_state(unsigned int irq, | ||
571 | struct timer_rand_state *state) | ||
572 | { | ||
573 | irq_timer_state[irq] = state; | ||
574 | } | ||
575 | |||
576 | #else | ||
577 | |||
578 | static struct timer_rand_state *get_timer_rand_state(unsigned int irq) | ||
579 | { | ||
580 | struct irq_desc *desc; | ||
581 | |||
582 | desc = irq_to_desc(irq); | ||
583 | |||
584 | return desc->timer_rand_state; | ||
585 | } | ||
586 | |||
587 | static void set_timer_rand_state(unsigned int irq, | ||
588 | struct timer_rand_state *state) | ||
589 | { | ||
590 | struct irq_desc *desc; | ||
591 | |||
592 | desc = irq_to_desc(irq); | ||
593 | |||
594 | desc->timer_rand_state = state; | ||
595 | } | ||
563 | #endif | 596 | #endif |
564 | 597 | ||
565 | static struct timer_rand_state input_timer_state; | 598 | static struct timer_rand_state input_timer_state; |
@@ -919,11 +952,6 @@ void rand_initialize_irq(int irq) | |||
919 | { | 952 | { |
920 | struct timer_rand_state *state; | 953 | struct timer_rand_state *state; |
921 | 954 | ||
922 | #ifndef CONFIG_SPARSE_IRQ | ||
923 | if (irq >= nr_irqs) | ||
924 | return; | ||
925 | #endif | ||
926 | |||
927 | state = get_timer_rand_state(irq); | 955 | state = get_timer_rand_state(irq); |
928 | 956 | ||
929 | if (state) | 957 | if (state) |