diff options
author | Theodore Ts'o <tytso@mit.edu> | 2012-07-14 20:27:52 -0400 |
---|---|---|
committer | Theodore Ts'o <tytso@mit.edu> | 2012-07-19 10:38:32 -0400 |
commit | c5857ccf293968348e5eb4ebedc68074de3dcda6 (patch) | |
tree | 33b74f247459881a9dfdaafd6eb2756c3894521a /drivers | |
parent | 27130f0cc3ab97560384da437e4621fc4e94f21c (diff) |
random: remove rand_initialize_irq()
With the new interrupt sampling system, we are no longer using the
timer_rand_state structure in the irq descriptor, so we can stop
initializing it now.
[ Merged in fixes from Sedat to find some last missing references to
rand_initialize_irq() ]
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Signed-off-by: Sedat Dilek <sedat.dilek@gmail.com>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/char/random.c | 55 | ||||
-rw-r--r-- | drivers/mfd/ab3100-core.c | 3 |
2 files changed, 0 insertions, 58 deletions
diff --git a/drivers/char/random.c b/drivers/char/random.c index e3180852ec85..9793b40f5754 100644 --- a/drivers/char/random.c +++ b/drivers/char/random.c | |||
@@ -634,43 +634,6 @@ struct timer_rand_state { | |||
634 | unsigned dont_count_entropy:1; | 634 | unsigned dont_count_entropy:1; |
635 | }; | 635 | }; |
636 | 636 | ||
637 | #ifndef CONFIG_GENERIC_HARDIRQS | ||
638 | |||
639 | static struct timer_rand_state *irq_timer_state[NR_IRQS]; | ||
640 | |||
641 | static struct timer_rand_state *get_timer_rand_state(unsigned int irq) | ||
642 | { | ||
643 | return irq_timer_state[irq]; | ||
644 | } | ||
645 | |||
646 | static void set_timer_rand_state(unsigned int irq, | ||
647 | struct timer_rand_state *state) | ||
648 | { | ||
649 | irq_timer_state[irq] = state; | ||
650 | } | ||
651 | |||
652 | #else | ||
653 | |||
654 | static struct timer_rand_state *get_timer_rand_state(unsigned int irq) | ||
655 | { | ||
656 | struct irq_desc *desc; | ||
657 | |||
658 | desc = irq_to_desc(irq); | ||
659 | |||
660 | return desc->timer_rand_state; | ||
661 | } | ||
662 | |||
663 | static void set_timer_rand_state(unsigned int irq, | ||
664 | struct timer_rand_state *state) | ||
665 | { | ||
666 | struct irq_desc *desc; | ||
667 | |||
668 | desc = irq_to_desc(irq); | ||
669 | |||
670 | desc->timer_rand_state = state; | ||
671 | } | ||
672 | #endif | ||
673 | |||
674 | /* | 637 | /* |
675 | * Add device- or boot-specific data to the input and nonblocking | 638 | * Add device- or boot-specific data to the input and nonblocking |
676 | * pools to help initialize them to unique values. | 639 | * pools to help initialize them to unique values. |
@@ -1133,24 +1096,6 @@ static int rand_initialize(void) | |||
1133 | } | 1096 | } |
1134 | module_init(rand_initialize); | 1097 | module_init(rand_initialize); |
1135 | 1098 | ||
1136 | void rand_initialize_irq(int irq) | ||
1137 | { | ||
1138 | struct timer_rand_state *state; | ||
1139 | |||
1140 | state = get_timer_rand_state(irq); | ||
1141 | |||
1142 | if (state) | ||
1143 | return; | ||
1144 | |||
1145 | /* | ||
1146 | * If kzalloc returns null, we just won't use that entropy | ||
1147 | * source. | ||
1148 | */ | ||
1149 | state = kzalloc(sizeof(struct timer_rand_state), GFP_KERNEL); | ||
1150 | if (state) | ||
1151 | set_timer_rand_state(irq, state); | ||
1152 | } | ||
1153 | |||
1154 | #ifdef CONFIG_BLOCK | 1099 | #ifdef CONFIG_BLOCK |
1155 | void rand_initialize_disk(struct gendisk *disk) | 1100 | void rand_initialize_disk(struct gendisk *disk) |
1156 | { | 1101 | { |
diff --git a/drivers/mfd/ab3100-core.c b/drivers/mfd/ab3100-core.c index 9522d6bda4f7..1287645b984d 100644 --- a/drivers/mfd/ab3100-core.c +++ b/drivers/mfd/ab3100-core.c | |||
@@ -931,9 +931,6 @@ static int __devinit ab3100_probe(struct i2c_client *client, | |||
931 | 931 | ||
932 | err = request_threaded_irq(client->irq, NULL, ab3100_irq_handler, | 932 | err = request_threaded_irq(client->irq, NULL, ab3100_irq_handler, |
933 | IRQF_ONESHOT, "ab3100-core", ab3100); | 933 | IRQF_ONESHOT, "ab3100-core", ab3100); |
934 | /* This real unpredictable IRQ is of course sampled for entropy */ | ||
935 | rand_initialize_irq(client->irq); | ||
936 | |||
937 | if (err) | 934 | if (err) |
938 | goto exit_no_irq; | 935 | goto exit_no_irq; |
939 | 936 | ||