Skip to content

Commit 1c3f69b

Browse files
John GarryMarc Zyngier
authored andcommitted
ACPI: Drop acpi_dev_irqresource_disabled()
The functionality of acpi_dev_irqresource_disabled() is same as in common irqresource_disabled(), so drop acpi_dev_irqresource_disabled() in favour of that function. Signed-off-by: John Garry <john.garry@huawei.com> Signed-off-by: Marc Zyngier <maz@kernel.org> Acked-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com> Link: https://lore.kernel.org/r/1606905417-183214-4-git-send-email-john.garry@huawei.com
1 parent 9806731 commit 1c3f69b

1 file changed

Lines changed: 5 additions & 12 deletions

File tree

drivers/acpi/resource.c

Lines changed: 5 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -380,21 +380,14 @@ unsigned int acpi_dev_get_irq_type(int triggering, int polarity)
380380
}
381381
EXPORT_SYMBOL_GPL(acpi_dev_get_irq_type);
382382

383-
static void acpi_dev_irqresource_disabled(struct resource *res, u32 gsi)
384-
{
385-
res->start = gsi;
386-
res->end = gsi;
387-
res->flags = IORESOURCE_IRQ | IORESOURCE_DISABLED | IORESOURCE_UNSET;
388-
}
389-
390383
static void acpi_dev_get_irqresource(struct resource *res, u32 gsi,
391384
u8 triggering, u8 polarity, u8 shareable,
392385
bool legacy)
393386
{
394387
int irq, p, t;
395388

396389
if (!valid_IRQ(gsi)) {
397-
acpi_dev_irqresource_disabled(res, gsi);
390+
irqresource_disabled(res, gsi);
398391
return;
399392
}
400393

@@ -426,7 +419,7 @@ static void acpi_dev_get_irqresource(struct resource *res, u32 gsi,
426419
res->start = irq;
427420
res->end = irq;
428421
} else {
429-
acpi_dev_irqresource_disabled(res, gsi);
422+
irqresource_disabled(res, gsi);
430423
}
431424
}
432425

@@ -463,7 +456,7 @@ bool acpi_dev_resource_interrupt(struct acpi_resource *ares, int index,
463456
*/
464457
irq = &ares->data.irq;
465458
if (index >= irq->interrupt_count) {
466-
acpi_dev_irqresource_disabled(res, 0);
459+
irqresource_disabled(res, 0);
467460
return false;
468461
}
469462
acpi_dev_get_irqresource(res, irq->interrupts[index],
@@ -473,15 +466,15 @@ bool acpi_dev_resource_interrupt(struct acpi_resource *ares, int index,
473466
case ACPI_RESOURCE_TYPE_EXTENDED_IRQ:
474467
ext_irq = &ares->data.extended_irq;
475468
if (index >= ext_irq->interrupt_count) {
476-
acpi_dev_irqresource_disabled(res, 0);
469+
irqresource_disabled(res, 0);
477470
return false;
478471
}
479472
if (is_gsi(ext_irq))
480473
acpi_dev_get_irqresource(res, ext_irq->interrupts[index],
481474
ext_irq->triggering, ext_irq->polarity,
482475
ext_irq->shareable, false);
483476
else
484-
acpi_dev_irqresource_disabled(res, 0);
477+
irqresource_disabled(res, 0);
485478
break;
486479
default:
487480
res->flags = 0;

0 commit comments

Comments
 (0)