[alsa-devel] [PATCH] ARM: S3C64XX: Fix fallthrough bug in i2sv3 gpio configuration, improve logging

Dimitris Papastamos dp at opensource.wolfsonmicro.com
Thu Aug 26 17:07:23 CEST 2010

If the platform device id is 1, the code will fallthrough the
case and incorrectly return -EINVAL. Add a break to avoid fallthrough.

Make logging slightly more verbose by including the device id.

This is a fix for a change in ASoC multi-component as well.

Signed-off-by: Dimitris Papastamos <dp at opensource.wolfsonmicro.com>
 arch/arm/mach-s3c64xx/dev-audio.c |    7 +++++--
 1 files changed, 5 insertions(+), 2 deletions(-)

diff --git a/arch/arm/mach-s3c64xx/dev-audio.c b/arch/arm/mach-s3c64xx/dev-audio.c
index f094258..3838335 100644
--- a/arch/arm/mach-s3c64xx/dev-audio.c
+++ b/arch/arm/mach-s3c64xx/dev-audio.c
@@ -43,8 +43,10 @@ static int s3c64xx_i2sv3_cfg_gpio(struct platform_device *pdev)
 		s3c_gpio_cfgpin(S3C64XX_GPE(2), S3C64XX_GPE2_I2S1_LRCLK);
 		s3c_gpio_cfgpin(S3C64XX_GPE(3), S3C64XX_GPE3_I2S1_DI);
 		s3c_gpio_cfgpin(S3C64XX_GPE(4), S3C64XX_GPE4_I2S1_D0);
+		break;
-		printk(KERN_DEBUG "Invalid I2S Controller number!");
+		printk(KERN_DEBUG "Invalid I2S Controller number: %d\n",
+			pdev->id);
 		return -EINVAL;
@@ -184,7 +186,8 @@ static int s3c64xx_pcm_cfg_gpio(struct platform_device *pdev)
 		s3c_gpio_cfgpin(S3C64XX_GPE(4), S3C64XX_GPE4_PCM1_SOUT);
-		printk(KERN_DEBUG "Invalid PCM Controller number!");
+		printk(KERN_DEBUG "Invalid PCM Controller number: %d\n",
+			pdev->id);
 		return -EINVAL;

More information about the Alsa-devel mailing list