aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorTheodore Ts'o <tytso@mit.edu>2012-07-14 20:27:52 -0400
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2012-08-15 15:04:28 -0400
commitb6b847a93be87fc9974d8232984668a5a59754df (patch)
treeae0c3cb7fe98627cd7e61d5f8fbae68fd3704d95 /drivers
parentf99ef862a7235bb06e963bd99e3c4287f5b8f6fd (diff)
random: remove rand_initialize_irq()
commit c5857ccf293968348e5eb4ebedc68074de3dcda6 upstream. 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> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/char/random.c55
-rw-r--r--drivers/mfd/ab3100-core.c3
-rw-r--r--drivers/mfd/ab3550-core.c2
3 files changed, 0 insertions, 60 deletions
diff --git a/drivers/char/random.c b/drivers/char/random.c
index e70701ec3b0..5df09b014ea 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
639static struct timer_rand_state *irq_timer_state[NR_IRQS];
640
641static struct timer_rand_state *get_timer_rand_state(unsigned int irq)
642{
643 return irq_timer_state[irq];
644}
645
646static 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
654static 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
663static 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}
1134module_init(rand_initialize); 1097module_init(rand_initialize);
1135 1098
1136void 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
1155void rand_initialize_disk(struct gendisk *disk) 1100void rand_initialize_disk(struct gendisk *disk)
1156{ 1101{
diff --git a/drivers/mfd/ab3100-core.c b/drivers/mfd/ab3100-core.c
index c0befd3ad98..ccd81b1540a 100644
--- a/drivers/mfd/ab3100-core.c
+++ b/drivers/mfd/ab3100-core.c
@@ -936,9 +936,6 @@ static int __devinit ab3100_probe(struct i2c_client *client,
936 936
937 err = request_threaded_irq(client->irq, NULL, ab3100_irq_handler, 937 err = request_threaded_irq(client->irq, NULL, ab3100_irq_handler,
938 IRQF_ONESHOT, "ab3100-core", ab3100); 938 IRQF_ONESHOT, "ab3100-core", ab3100);
939 /* This real unpredictable IRQ is of course sampled for entropy */
940 rand_initialize_irq(client->irq);
941
942 if (err) 939 if (err)
943 goto exit_no_irq; 940 goto exit_no_irq;
944 941
diff --git a/drivers/mfd/ab3550-core.c b/drivers/mfd/ab3550-core.c
index 3d7dce671b9..d69dc4bf8bb 100644
--- a/drivers/mfd/ab3550-core.c
+++ b/drivers/mfd/ab3550-core.c
@@ -1309,8 +1309,6 @@ static int __init ab3550_probe(struct i2c_client *client,
1309 1309
1310 err = request_threaded_irq(client->irq, NULL, ab3550_irq_handler, 1310 err = request_threaded_irq(client->irq, NULL, ab3550_irq_handler,
1311 IRQF_ONESHOT, "ab3550-core", ab); 1311 IRQF_ONESHOT, "ab3550-core", ab);
1312 /* This real unpredictable IRQ is of course sampled for entropy */
1313 rand_initialize_irq(client->irq);
1314 1312
1315 if (err) 1313 if (err)
1316 goto exit_no_irq; 1314 goto exit_no_irq;