diff mbox

powerpc/msi: Fix compile error on mpc83xx

Message ID 1372728892-31501-1-git-send-email-hongtao.jia@freescale.com (mailing list archive)
State Accepted, archived
Commit df1024ad87286c5935d4ebb5153bf4cebf45eb8a
Headers show

Commit Message

Hongtao Jia July 2, 2013, 1:34 a.m. UTC
mpic_get_primary_version() is not defined when not using MPIC.
The compile error log like:

arch/powerpc/sysdev/built-in.o: In function `fsl_of_msi_probe':
fsl_msi.c:(.text+0x150c): undefined reference to `fsl_mpic_primary_get_version'

Signed-off-by: Jia Hongtao <B38951@freescale.com>
Signed-off-by: Jia Hongtao <hongtao.jia@freescale.com>
---
 arch/powerpc/include/asm/mpic.h | 7 +++++++
 1 file changed, 7 insertions(+)

Comments

Hongtao Jia July 2, 2013, 2:26 a.m. UTC | #1
Please ignore this patch.

-Hongtao

> -----Original Message-----
> From: Jia Hongtao-B38951
> Sent: Tuesday, July 02, 2013 9:35 AM
> To: linuxppc-dev@lists.ozlabs.org; Wood Scott-B07421
> Cc: galak@kernel.crashing.org; Li Yang-R58472; Jia Hongtao-B38951
> Subject: [PATCH] powerpc/msi: Fix compile error on mpc83xx
> 
> mpic_get_primary_version() is not defined when not using MPIC.
> The compile error log like:
> 
> arch/powerpc/sysdev/built-in.o: In function `fsl_of_msi_probe':
> fsl_msi.c:(.text+0x150c): undefined reference to
> `fsl_mpic_primary_get_version'
> 
> Signed-off-by: Jia Hongtao <B38951@freescale.com>
> Signed-off-by: Jia Hongtao <hongtao.jia@freescale.com>
> ---
>  arch/powerpc/include/asm/mpic.h | 7 +++++++
>  1 file changed, 7 insertions(+)
> 
> diff --git a/arch/powerpc/include/asm/mpic.h
> b/arch/powerpc/include/asm/mpic.h
> index ea6bf72..97b5a63 100644
> --- a/arch/powerpc/include/asm/mpic.h
> +++ b/arch/powerpc/include/asm/mpic.h
> @@ -394,7 +394,14 @@ struct mpic
>  #define	MPIC_REGSET_TSI108		MPIC_REGSET(1)	/* Tsi108/109
> PIC */
> 
>  /* Get the version of primary MPIC */
> +#ifdef CONFIG_MPIC
>  extern u32 fsl_mpic_primary_get_version(void);
> +#else
> +static inline u32 fsl_mpic_primary_get_version(void)
> +{
> +	return 0;
> +}
> +#endif
> 
>  /* Allocate the controller structure and setup the linux irq descs
>   * for the range if interrupts passed in. No HW initialization is
> --
> 1.8.0
diff mbox

Patch

diff --git a/arch/powerpc/include/asm/mpic.h b/arch/powerpc/include/asm/mpic.h
index ea6bf72..97b5a63 100644
--- a/arch/powerpc/include/asm/mpic.h
+++ b/arch/powerpc/include/asm/mpic.h
@@ -394,7 +394,14 @@  struct mpic
 #define	MPIC_REGSET_TSI108		MPIC_REGSET(1)	/* Tsi108/109 PIC */
 
 /* Get the version of primary MPIC */
+#ifdef CONFIG_MPIC
 extern u32 fsl_mpic_primary_get_version(void);
+#else
+static inline u32 fsl_mpic_primary_get_version(void)
+{
+	return 0;
+}
+#endif
 
 /* Allocate the controller structure and setup the linux irq descs
  * for the range if interrupts passed in. No HW initialization is