aboutsummaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
Diffstat (limited to 'drivers')
-rw-r--r--drivers/char/random.c5
-rw-r--r--drivers/pci/intr_remapping.c11
2 files changed, 2 insertions, 14 deletions
diff --git a/drivers/char/random.c b/drivers/char/random.c
index 9ce80213007..1137d297604 100644
--- a/drivers/char/random.c
+++ b/drivers/char/random.c
@@ -558,12 +558,7 @@ struct timer_rand_state {
unsigned dont_count_entropy:1;
};
-#ifdef CONFIG_HAVE_DYN_ARRAY
-static struct timer_rand_state **irq_timer_state;
-DEFINE_DYN_ARRAY(irq_timer_state, sizeof(struct timer_rand_state *), nr_irqs, PAGE_SIZE, NULL);
-#else
static struct timer_rand_state *irq_timer_state[NR_IRQS];
-#endif
static struct timer_rand_state *get_timer_rand_state(unsigned int irq)
{
diff --git a/drivers/pci/intr_remapping.c b/drivers/pci/intr_remapping.c
index 0f43b265eee..950769e8747 100644
--- a/drivers/pci/intr_remapping.c
+++ b/drivers/pci/intr_remapping.c
@@ -19,20 +19,13 @@ struct irq_2_iommu {
u8 irte_mask;
};
-#ifdef CONFIG_HAVE_DYN_ARRAY
-static struct irq_2_iommu *irq_2_iommuX;
-DEFINE_DYN_ARRAY(irq_2_iommuX, sizeof(struct irq_2_iommu), nr_irqs, PAGE_SIZE, NULL);
-#else
static struct irq_2_iommu irq_2_iommuX[NR_IRQS];
-#endif
static struct irq_2_iommu *irq_2_iommu(unsigned int irq)
{
- if (irq < nr_irqs)
- return &irq_2_iommuX[irq];
-
- return NULL;
+ return (irq < nr_irqs) ?: irq_2_iommuX + irq : NULL;
}
+
static struct irq_2_iommu *irq_2_iommu_alloc(unsigned int irq)
{
return irq_2_iommu(irq);