ARM: S3C64XX: Fix fallthrough bug in i2sv3 gpio configuration, improve logging
authorDimitris Papastamos <dp@opensource.wolfsonmicro.com>
Thu, 26 Aug 2010 15:07:23 +0000 (16:07 +0100)
committerMark Brown <broonie@opensource.wolfsonmicro.com>
Fri, 27 Aug 2010 10:23:27 +0000 (11:23 +0100)
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 fixes an issue only present in multi-component.

Signed-off-by: Dimitris Papastamos <dp@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
arch/arm/mach-s3c64xx/dev-audio.c

index f0942585b9c16720d5132b73c05dc6a5a2e5fa80..3838335f125b65067d9e771b7e48af8ca1b07218 100644 (file)
@@ -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;
        default:
-               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);
                break;
        default:
-               printk(KERN_DEBUG "Invalid PCM Controller number!");
+               printk(KERN_DEBUG "Invalid PCM Controller number: %d\n",
+                       pdev->id);
                return -EINVAL;
        }