[alsa-devel] [PATCH] ARM: S3C64XX: Fix fallthrough bug in i2sv3 gpio configuration, improve logging
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@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; 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; }
On Thu, Aug 26, 2010 at 04:07:23PM +0100, Dimitris Papastamos wrote:
This is a fix for a change in ASoC multi-component as well.
Clarifying from offline discussion: the issue isn't present in mainline, it came in with m-c.
On Thu, 2010-08-26 at 16:21 +0100, Mark Brown wrote:
On Thu, Aug 26, 2010 at 04:07:23PM +0100, Dimitris Papastamos wrote:
This is a fix for a change in ASoC multi-component as well.
Clarifying from offline discussion: the issue isn't present in mainline, it came in with m-c.
Acked-by: Liam Girdwood lrg@slimlogic.co.uk
On Fri, Aug 27, 2010 at 11:18:40AM +0100, Liam Girdwood wrote:
On Thu, 2010-08-26 at 16:21 +0100, Mark Brown wrote:
On Thu, Aug 26, 2010 at 04:07:23PM +0100, Dimitris Papastamos wrote:
This is a fix for a change in ASoC multi-component as well.
Clarifying from offline discussion: the issue isn't present in mainline, it came in with m-c.
Acked-by: Liam Girdwood lrg@slimlogic.co.uk
Applied, thanks.
participants (3)
-
Dimitris Papastamos
-
Liam Girdwood
-
Mark Brown