mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-28 10:41:38 -04:00
sparseirq: move set/get_timer_rand_state back to .c
those two functions only used in that C file Signed-off-by: Yinghai Lu <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
This commit is contained in:
parent
e9e67a8b57
commit
2f98357001
2 changed files with 34 additions and 56 deletions
|
|
@ -559,7 +559,40 @@ struct timer_rand_state {
|
|||
};
|
||||
|
||||
#ifndef CONFIG_SPARSE_IRQ
|
||||
struct timer_rand_state *irq_timer_state[NR_IRQS];
|
||||
|
||||
static struct timer_rand_state *irq_timer_state[NR_IRQS];
|
||||
|
||||
static struct timer_rand_state *get_timer_rand_state(unsigned int irq)
|
||||
{
|
||||
return irq_timer_state[irq];
|
||||
}
|
||||
|
||||
static void set_timer_rand_state(unsigned int irq,
|
||||
struct timer_rand_state *state)
|
||||
{
|
||||
irq_timer_state[irq] = state;
|
||||
}
|
||||
|
||||
#else
|
||||
|
||||
static struct timer_rand_state *get_timer_rand_state(unsigned int irq)
|
||||
{
|
||||
struct irq_desc *desc;
|
||||
|
||||
desc = irq_to_desc(irq);
|
||||
|
||||
return desc->timer_rand_state;
|
||||
}
|
||||
|
||||
static void set_timer_rand_state(unsigned int irq,
|
||||
struct timer_rand_state *state)
|
||||
{
|
||||
struct irq_desc *desc;
|
||||
|
||||
desc = irq_to_desc(irq);
|
||||
|
||||
desc->timer_rand_state = state;
|
||||
}
|
||||
#endif
|
||||
|
||||
static struct timer_rand_state input_timer_state;
|
||||
|
|
@ -919,11 +952,6 @@ void rand_initialize_irq(int irq)
|
|||
{
|
||||
struct timer_rand_state *state;
|
||||
|
||||
#ifndef CONFIG_SPARSE_IRQ
|
||||
if (irq >= nr_irqs)
|
||||
return;
|
||||
#endif
|
||||
|
||||
state = get_timer_rand_state(irq);
|
||||
|
||||
if (state)
|
||||
|
|
|
|||
Loading…
Reference in a new issue