[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <164612949579.16921.6842959382902482473.tip-bot2@tip-bot2>
Date: Tue, 01 Mar 2022 10:11:35 -0000
From: "irqchip-bot for Marc Zyngier" <tip-bot2@...utronix.de>
To: linux-kernel@...r.kernel.org
Cc: Marc Zyngier <maz@...nel.org>,
Maulik Shah <quic_mkshah@...cinc.com>, tglx@...utronix.de
Subject: [irqchip: irq/irqchip-next] irqchip/qcom-pdc: Kill qcom_pdc_translate helper
The following commit has been merged into the irq/irqchip-next branch of irqchip:
Commit-ID: d494d088ac44b9cf561362a7856fa20b656be64f
Gitweb: https://git.kernel.org/pub/scm/linux/kernel/git/maz/arm-platforms/d494d088ac44b9cf561362a7856fa20b656be64f
Author: Marc Zyngier <maz@...nel.org>
AuthorDate: Thu, 24 Feb 2022 10:12:24
Committer: Marc Zyngier <maz@...nel.org>
CommitterDate: Tue, 01 Mar 2022 10:06:24
irqchip/qcom-pdc: Kill qcom_pdc_translate helper
qcom_pdc_translate() really is nothing but an open coded version
of irq_domain_translate_twocell(). Get rid of it and use the common
version instead.
Signed-off-by: Marc Zyngier <maz@...nel.org>
Reviewed-by: Maulik Shah <quic_mkshah@...cinc.com>
Link: https://lore.kernel.org/r/20220224101226.88373-4-maz@kernel.org
---
drivers/irqchip/qcom-pdc.c | 19 ++-----------------
1 file changed, 2 insertions(+), 17 deletions(-)
diff --git a/drivers/irqchip/qcom-pdc.c b/drivers/irqchip/qcom-pdc.c
index 5be5314..837ca69 100644
--- a/drivers/irqchip/qcom-pdc.c
+++ b/drivers/irqchip/qcom-pdc.c
@@ -198,21 +198,6 @@ static struct pdc_pin_region *get_pin_region(int pin)
return NULL;
}
-static int qcom_pdc_translate(struct irq_domain *d, struct irq_fwspec *fwspec,
- unsigned long *hwirq, unsigned int *type)
-{
- if (is_of_node(fwspec->fwnode)) {
- if (fwspec->param_count != 2)
- return -EINVAL;
-
- *hwirq = fwspec->param[0];
- *type = fwspec->param[1] & IRQ_TYPE_SENSE_MASK;
- return 0;
- }
-
- return -EINVAL;
-}
-
static int qcom_pdc_alloc(struct irq_domain *domain, unsigned int virq,
unsigned int nr_irqs, void *data)
{
@@ -223,7 +208,7 @@ static int qcom_pdc_alloc(struct irq_domain *domain, unsigned int virq,
unsigned int type;
int ret;
- ret = qcom_pdc_translate(domain, fwspec, &hwirq, &type);
+ ret = irq_domain_translate_twocell(domain, fwspec, &hwirq, &type);
if (ret)
return ret;
@@ -256,7 +241,7 @@ static int qcom_pdc_alloc(struct irq_domain *domain, unsigned int virq,
}
static const struct irq_domain_ops qcom_pdc_ops = {
- .translate = qcom_pdc_translate,
+ .translate = irq_domain_translate_twocell,
.alloc = qcom_pdc_alloc,
.free = irq_domain_free_irqs_common,
};
Powered by blists - more mailing lists