diff mbox series

[1/2] of/irq: Export of_irq_count()

Message ID 20230717205357.2779473-2-samuel.holland@sifive.com
State Changes Requested, archived
Headers show
Series gpio: sifive: Module support | expand

Checks

Context Check Description
robh/checkpatch success
robh/patch-applied fail build log

Commit Message

Samuel Holland July 17, 2023, 8:53 p.m. UTC
This function is used by the SiFive GPIO driver. Export it so that
driver can be built as a module.

Signed-off-by: Samuel Holland <samuel.holland@sifive.com>
---

 drivers/of/irq.c | 1 +
 1 file changed, 1 insertion(+)

Comments

Andy Shevchenko July 17, 2023, 9:40 p.m. UTC | #1
On Mon, Jul 17, 2023 at 11:54 PM Samuel Holland
<samuel.holland@sifive.com> wrote:
>
> This function is used by the SiFive GPIO driver. Export it so that
> driver can be built as a module.

Can we rather reduce use of of_*() APIs?
For example, why not use platform_irq_count()?
Rob Herring (Arm) July 18, 2023, 10:42 p.m. UTC | #2
On Tue, Jul 18, 2023 at 12:40:53AM +0300, Andy Shevchenko wrote:
> On Mon, Jul 17, 2023 at 11:54 PM Samuel Holland
> <samuel.holland@sifive.com> wrote:
> >
> > This function is used by the SiFive GPIO driver. Export it so that
> > driver can be built as a module.
> 
> Can we rather reduce use of of_*() APIs?
> For example, why not use platform_irq_count()?

+1
diff mbox series

Patch

diff --git a/drivers/of/irq.c b/drivers/of/irq.c
index 174900072c18..9cea7632dd6a 100644
--- a/drivers/of/irq.c
+++ b/drivers/of/irq.c
@@ -489,6 +489,7 @@  int of_irq_count(struct device_node *dev)
 
 	return nr;
 }
+EXPORT_SYMBOL_GPL(of_irq_count);
 
 /**
  * of_irq_to_resource_table - Fill in resource table with node's IRQ info