Re: [PATCH 2/3] of/irq: fix guards of of_irq_find_parent and of_msi_configure

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




On Mon, Sep 7, 2015 at 7:37 AM, Jonas Gorski <jogo@xxxxxxxxxxx> wrote:
> Only irq_of_parse_and_map is implemented differently on SPARC, so only
> that one should be protected by the CONFIG_OF guard.

of_irq_find_parent is only used by of_irq.c, so just make it static.

Rob

>
> Signed-off-by: Jonas Gorski <jogo@xxxxxxxxxxx>
> ---
>  include/linux/of_irq.h | 19 +++++++++----------
>  1 file changed, 9 insertions(+), 10 deletions(-)
>
> diff --git a/include/linux/of_irq.h b/include/linux/of_irq.h
> index 7b81771..d6a6d2e 100644
> --- a/include/linux/of_irq.h
> +++ b/include/linux/of_irq.h
> @@ -46,6 +46,8 @@ extern int of_irq_get(struct device_node *dev, int index);
>  extern int of_irq_get_byname(struct device_node *dev, const char *name);
>  extern int of_irq_to_resource_table(struct device_node *dev,
>                 struct resource *res, int nr_irqs);
> +extern struct device_node *of_irq_find_parent(struct device_node *child);
> +extern void of_msi_configure(struct device *dev, struct device_node *np);
>  #else
>  static inline int of_irq_count(struct device_node *dev)
>  {
> @@ -64,6 +66,13 @@ static inline int of_irq_to_resource_table(struct device_node *dev,
>  {
>         return 0;
>  }
> +static inline void *of_irq_find_parent(struct device_node *child)
> +{
> +       return NULL;
> +}
> +static inline void of_msi_configure(struct device *dev, struct device_node *np)
> +{
> +}
>  #endif
>
>  #if defined(CONFIG_OF)
> @@ -73,7 +82,6 @@ static inline int of_irq_to_resource_table(struct device_node *dev,
>   * so declare it here regardless of the CONFIG_OF_IRQ setting.
>   */
>  extern unsigned int irq_of_parse_and_map(struct device_node *node, int index);
> -extern struct device_node *of_irq_find_parent(struct device_node *child);
>
>  #else /* !CONFIG_OF */
>  static inline unsigned int irq_of_parse_and_map(struct device_node *dev,
> @@ -81,15 +89,6 @@ static inline unsigned int irq_of_parse_and_map(struct device_node *dev,
>  {
>         return 0;
>  }
> -
> -static inline void *of_irq_find_parent(struct device_node *child)
> -{
> -       return NULL;
> -}
> -
> -static inline void of_msi_configure(struct device *dev, struct device_node *np)
> -{
> -}
>  #endif /* !CONFIG_OF */
>
>  #endif /* __OF_IRQ_H */
> --
> 2.1.4
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Device Tree Compilter]     [Device Tree Spec]     [Linux Driver Backports]     [Video for Linux]     [Linux USB Devel]     [Linux PCI Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Yosemite Backpacking]
  Powered by Linux