diff options
author | lawrence rust <lawrence@softsystem.co.uk> | 2010-08-23 12:49:58 +0200 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2010-10-21 05:04:49 +0200 |
commit | d06b49ed18736d32530067e2cad5a18d3482a2b9 (patch) | |
tree | c3fb0784e85c04199bdae96b632c1443da2a0c9c /drivers/media/video/cx88/cx88-dsp.c | |
parent | V4L/DVB: drivers/media/video: Use available error codes (diff) | |
download | linux-d06b49ed18736d32530067e2cad5a18d3482a2b9.tar.xz linux-d06b49ed18736d32530067e2cad5a18d3482a2b9.zip |
V4L/DVB: cx88: convert core->tvaudio into an enum
Using an enum and removing the default case from switch statements accessing
the value enables the compiler to emit a warning (enabled with -Wall) when an
audio mode is not handled.
This highlights an omission in the function cx88_dsp_detect_stereo_sap()
(in cx88-dsp.c) not handling WW_EIAJ and WW_M.
Signed-off-by: Lawrence Rust <lawrence@softsystem.co.uk>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/video/cx88/cx88-dsp.c')
-rw-r--r-- | drivers/media/video/cx88/cx88-dsp.c | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/drivers/media/video/cx88/cx88-dsp.c b/drivers/media/video/cx88/cx88-dsp.c index a94e00a4ac5d..e1d6eef233dc 100644 --- a/drivers/media/video/cx88/cx88-dsp.c +++ b/drivers/media/video/cx88/cx88-dsp.c @@ -175,7 +175,13 @@ static s32 detect_a2_a2m_eiaj(struct cx88_core *core, s16 x[], u32 N) stereo_freq = FREQ_EIAJ_STEREO; dual_freq = FREQ_EIAJ_DUAL; break; - default: + case WW_NONE: + case WW_BTSC: + case WW_I: + case WW_L: + case WW_I2SPT: + case WW_FM: + case WW_I2SADC: printk(KERN_WARNING "%s/0: unsupported audio mode %d for %s\n", core->name, core->tvaudio, __func__); return UNSET; @@ -292,11 +298,20 @@ s32 cx88_dsp_detect_stereo_sap(struct cx88_core *core) switch (core->tvaudio) { case WW_BG: case WW_DK: + case WW_EIAJ: + case WW_M: ret = detect_a2_a2m_eiaj(core, samples, N); break; case WW_BTSC: ret = detect_btsc(core, samples, N); break; + case WW_NONE: + case WW_I: + case WW_L: + case WW_I2SPT: + case WW_FM: + case WW_I2SADC: + break; } kfree(samples); |