ARM: S3C64XX: Fix fallthrough bug in i2sv3 gpio configuration, improve logging
Subsystems (3)
PATCH 1/1 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.
--- arch/arm/mach-s3c64xx/dev-audio.c | 7 +++++-- 1 files changed, 5 insertions(+), 2 deletions(-)
arch/arm/mach-s3c64xx/dev-audio.c +5 -2
@@ -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 ; }
Signature · 1 line
1.7.2.2
Quoted 1 line · Dimitris Papastamos
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.
Liam Girdwood
Acked-byQuoted 6 lines · Mark Brown
Quoted 1 line · Dimitris Papastamos
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.
Signature · 3 lines
Freelance Developer, SlimLogic Ltd ASoC and Voltage Regulator Maintainer. http://www.slimlogic.co.uk
Mark Brown
AppliedQuoted 9 lines · Liam Girdwood
Quoted 6 lines · Mark Brown
Quoted 1 line · Dimitris Papastamos
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 <[email protected]>
Applied, thanks.