]> git.karo-electronics.de Git - karo-tx-linux.git/commit
powerpc/cpm1: Fix build with various CONFIG_*_UCODE_PATCH combinations
authorAnton Vorontsov <avorontsov@mvista.com>
Thu, 8 Jul 2010 17:16:14 +0000 (21:16 +0400)
committerKumar Gala <galak@kernel.crashing.org>
Sun, 11 Jul 2010 16:03:49 +0000 (11:03 -0500)
commit2069a6ae19a34d96cc9cb284eb645b165138e03f
tree6a176cb00eab48113e1b99fa3601be46f0be4a7c
parent56825c88ff438f4dbb51a44591cc29e707fe783a
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>
arch/powerpc/sysdev/micropatch.c