aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc/sysdev/micropatch.c
diff options
context:
space:
mode:
authorAnton Vorontsov <avorontsov@mvista.com>2010-07-08 13:16:14 -0400
committerKumar Gala <galak@kernel.crashing.org>2010-07-11 12:03:49 -0400
commit2069a6ae19a34d96cc9cb284eb645b165138e03f (patch)
tree6a176cb00eab48113e1b99fa3601be46f0be4a7c /arch/powerpc/sysdev/micropatch.c
parent56825c88ff438f4dbb51a44591cc29e707fe783a (diff)
powerpc/cpm1: Fix build with various CONFIG_*_UCODE_PATCH combinations
Warnings are treated as errors for arch/powerpc code, so build fails with CONFIG_I2C_SPI_UCODE_PATCH=y: CC arch/powerpc/sysdev/micropatch.o cc1: warnings being treated as errors arch/powerpc/sysdev/micropatch.c: In function 'cpm_load_patch': arch/powerpc/sysdev/micropatch.c:630: warning: unused variable 'smp' make[1]: *** [arch/powerpc/sysdev/micropatch.o] Error 1 And with CONFIG_USB_SOF_UCODE_PATCH=y: CC arch/powerpc/sysdev/micropatch.o cc1: warnings being treated as errors arch/powerpc/sysdev/micropatch.c: In function 'cpm_load_patch': arch/powerpc/sysdev/micropatch.c:629: warning: unused variable 'spp' arch/powerpc/sysdev/micropatch.c:628: warning: unused variable 'iip' make[1]: *** [arch/powerpc/sysdev/micropatch.o] Error 1 This patch fixes these issues by introducing proper #ifdefs. Cc: <stable@kernel.org> [ .33, .34 ] Signed-off-by: Anton Vorontsov <avorontsov@mvista.com> Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
Diffstat (limited to 'arch/powerpc/sysdev/micropatch.c')
-rw-r--r--arch/powerpc/sysdev/micropatch.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/arch/powerpc/sysdev/micropatch.c b/arch/powerpc/sysdev/micropatch.c
index 18080f376e1a..6c56ae902d4c 100644
--- a/arch/powerpc/sysdev/micropatch.c
+++ b/arch/powerpc/sysdev/micropatch.c
@@ -626,9 +626,14 @@ cpm_load_patch(cpm8xx_t *cp)
626{ 626{
627 volatile uint *dp; /* Dual-ported RAM. */ 627 volatile uint *dp; /* Dual-ported RAM. */
628 volatile cpm8xx_t *commproc; 628 volatile cpm8xx_t *commproc;
629#if defined(CONFIG_I2C_SPI_UCODE_PATCH) || \
630 defined(CONFIG_I2C_SPI_SMC1_UCODE_PATCH)
629 volatile iic_t *iip; 631 volatile iic_t *iip;
630 volatile struct spi_pram *spp; 632 volatile struct spi_pram *spp;
633#ifdef CONFIG_I2C_SPI_SMC1_UCODE_PATCH
631 volatile smc_uart_t *smp; 634 volatile smc_uart_t *smp;
635#endif
636#endif
632 int i; 637 int i;
633 638
634 commproc = cp; 639 commproc = cp;