of/irq: export of_irq_count

Message ID 1444905402-10510-1-git-send-email-zhangfei.gao@linaro.org
State New
Headers show

Commit Message

Zhangfei Gao Oct. 15, 2015, 10:36 a.m.
Export of_irq_count, otherwise module build fail if of_irq_count is used

Signed-off-by: Zhangfei Gao <zhangfei.gao@linaro.org>
Signed-off-by: John Garry <john.garry@huawei.com>
---
 drivers/of/irq.c | 1 +
 1 file changed, 1 insertion(+)

Comments

Arnd Bergmann Oct. 15, 2015, 11:22 a.m. | #1
On Thursday 15 October 2015 18:36:42 Zhangfei Gao wrote:
> Export of_irq_count, otherwise module build fail if of_irq_count is used
> 
> Signed-off-by: Zhangfei Gao <zhangfei.gao@linaro.org>
> Signed-off-by: John Garry <john.garry@huawei.com>
> 

Acked-by: Arnd Bergmann <arnd@arndb.de>
Rob Herring Oct. 15, 2015, 1:47 p.m. | #2
On Thu, Oct 15, 2015 at 5:36 AM, Zhangfei Gao <zhangfei.gao@linaro.org> wrote:
> Export of_irq_count, otherwise module build fail if of_irq_count is used

Which module?

>
> Signed-off-by: Zhangfei Gao <zhangfei.gao@linaro.org>
> Signed-off-by: John Garry <john.garry@huawei.com>
> ---
>  drivers/of/irq.c | 1 +
>  1 file changed, 1 insertion(+)
>
> diff --git a/drivers/of/irq.c b/drivers/of/irq.c
> index 0c7f4cbe3434..0d149cc48cfe 100644
> --- a/drivers/of/irq.c
> +++ b/drivers/of/irq.c
> @@ -448,6 +448,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
> --
> 1.9.1
>
Zhangfei Gao Oct. 15, 2015, 1:52 p.m. | #3
Hi, Rob

On 10/15/2015 09:47 PM, Rob Herring wrote:
> On Thu, Oct 15, 2015 at 5:36 AM, Zhangfei Gao <zhangfei.gao@linaro.org> wrote:
>> Export of_irq_count, otherwise module build fail if of_irq_count is used
>
> Which module?

We are developing sas driver for hisilicon hip660 platform.
We using of_irq_count to get irq number, since there are many irqs.
When we testing with build module, find build error since of_irq_count 
is not exported.

Thanks
Zhangfei Gao Nov. 18, 2015, 2:28 p.m. | #4
Hi Rob

On 10/15/2015 09:47 PM, Rob Herring wrote:
> On Thu, Oct 15, 2015 at 5:36 AM, Zhangfei Gao <zhangfei.gao@linaro.org> wrote:

>> Export of_irq_count, otherwise module build fail if of_irq_count is used

>

> Which module?


https://lkml.org/lkml/2015/11/17/572

What do you think about this patch?

There is ERROR reported from kbuild.

[auto build test ERROR on scsi/for-next]
[also build test ERROR on v4.4-rc1 next-20151116]

url: 
https://github.com/0day-ci/linux/commits/John-Garry/HiSilicon-SAS-driver/20151116-215304
base:   https://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi.git 
for-next
config: i386-allmodconfig (attached as .config)
reproduce:
         # save the attached .config to linux build tree
         make ARCH=i386

All errors (new ones prefixed by >>):

 >> ERROR: "of_irq_count" undefined!


Thanks

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

Patch

diff --git a/drivers/of/irq.c b/drivers/of/irq.c
index 0c7f4cbe3434..0d149cc48cfe 100644
--- a/drivers/of/irq.c
+++ b/drivers/of/irq.c
@@ -448,6 +448,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