mirror of
https://gitee.com/bianbu-linux/linux-6.6
synced 2025-04-26 14:17:26 -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 <yinghai@kernel.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
This commit is contained in:
parent
e9e67a8b57
commit
2f98357001
2 changed files with 34 additions and 56 deletions
|
@ -45,56 +45,6 @@ struct rand_pool_info {
|
|||
|
||||
extern void rand_initialize_irq(int irq);
|
||||
|
||||
struct timer_rand_state;
|
||||
#ifndef CONFIG_SPARSE_IRQ
|
||||
|
||||
extern struct timer_rand_state *irq_timer_state[];
|
||||
|
||||
static inline struct timer_rand_state *get_timer_rand_state(unsigned int irq)
|
||||
{
|
||||
if (irq >= nr_irqs)
|
||||
return NULL;
|
||||
|
||||
return irq_timer_state[irq];
|
||||
}
|
||||
|
||||
static inline void set_timer_rand_state(unsigned int irq, struct timer_rand_state *state)
|
||||
{
|
||||
if (irq >= nr_irqs)
|
||||
return;
|
||||
|
||||
irq_timer_state[irq] = state;
|
||||
}
|
||||
|
||||
#else
|
||||
|
||||
#include <linux/irq.h>
|
||||
static inline struct timer_rand_state *get_timer_rand_state(unsigned int irq)
|
||||
{
|
||||
struct irq_desc *desc;
|
||||
|
||||
desc = irq_to_desc(irq);
|
||||
|
||||
if (!desc)
|
||||
return NULL;
|
||||
|
||||
return desc->timer_rand_state;
|
||||
}
|
||||
|
||||
static inline void set_timer_rand_state(unsigned int irq, struct timer_rand_state *state)
|
||||
{
|
||||
struct irq_desc *desc;
|
||||
|
||||
desc = irq_to_desc(irq);
|
||||
|
||||
if (!desc)
|
||||
return;
|
||||
|
||||
desc->timer_rand_state = state;
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
extern void add_input_randomness(unsigned int type, unsigned int code,
|
||||
unsigned int value);
|
||||
extern void add_interrupt_randomness(int irq);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue