diff options
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/char/random.c | 5 | ||||
-rw-r--r-- | drivers/pci/intr_remapping.c | 11 |
2 files changed, 2 insertions, 14 deletions
diff --git a/drivers/char/random.c b/drivers/char/random.c index 9ce80213007b..1137d2976043 100644 --- a/drivers/char/random.c +++ b/drivers/char/random.c | |||
@@ -558,12 +558,7 @@ struct timer_rand_state { | |||
558 | unsigned dont_count_entropy:1; | 558 | unsigned dont_count_entropy:1; |
559 | }; | 559 | }; |
560 | 560 | ||
561 | #ifdef CONFIG_HAVE_DYN_ARRAY | ||
562 | static struct timer_rand_state **irq_timer_state; | ||
563 | DEFINE_DYN_ARRAY(irq_timer_state, sizeof(struct timer_rand_state *), nr_irqs, PAGE_SIZE, NULL); | ||
564 | #else | ||
565 | static struct timer_rand_state *irq_timer_state[NR_IRQS]; | 561 | static struct timer_rand_state *irq_timer_state[NR_IRQS]; |
566 | #endif | ||
567 | 562 | ||
568 | static struct timer_rand_state *get_timer_rand_state(unsigned int irq) | 563 | static struct timer_rand_state *get_timer_rand_state(unsigned int irq) |
569 | { | 564 | { |
diff --git a/drivers/pci/intr_remapping.c b/drivers/pci/intr_remapping.c index 0f43b265eee6..950769e87475 100644 --- a/drivers/pci/intr_remapping.c +++ b/drivers/pci/intr_remapping.c | |||
@@ -19,20 +19,13 @@ struct irq_2_iommu { | |||
19 | u8 irte_mask; | 19 | u8 irte_mask; |
20 | }; | 20 | }; |
21 | 21 | ||
22 | #ifdef CONFIG_HAVE_DYN_ARRAY | ||
23 | static struct irq_2_iommu *irq_2_iommuX; | ||
24 | DEFINE_DYN_ARRAY(irq_2_iommuX, sizeof(struct irq_2_iommu), nr_irqs, PAGE_SIZE, NULL); | ||
25 | #else | ||
26 | static struct irq_2_iommu irq_2_iommuX[NR_IRQS]; | 22 | static struct irq_2_iommu irq_2_iommuX[NR_IRQS]; |
27 | #endif | ||
28 | 23 | ||
29 | static struct irq_2_iommu *irq_2_iommu(unsigned int irq) | 24 | static struct irq_2_iommu *irq_2_iommu(unsigned int irq) |
30 | { | 25 | { |
31 | if (irq < nr_irqs) | 26 | return (irq < nr_irqs) ?: irq_2_iommuX + irq : NULL; |
32 | return &irq_2_iommuX[irq]; | ||
33 | |||
34 | return NULL; | ||
35 | } | 27 | } |
28 | |||
36 | static struct irq_2_iommu *irq_2_iommu_alloc(unsigned int irq) | 29 | static struct irq_2_iommu *irq_2_iommu_alloc(unsigned int irq) |
37 | { | 30 | { |
38 | return irq_2_iommu(irq); | 31 | return irq_2_iommu(irq); |