aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/video/sh_mobile_hdmi.c
diff options
context:
space:
mode:
authorKuninori Morimoto <kuninori.morimoto.gx@renesas.com>2010-09-08 22:48:01 -0400
committerMark Brown <broonie@opensource.wolfsonmicro.com>2010-09-10 11:07:41 -0400
commitdec6aa49abf73b061b631163cb1e1d803a614d24 (patch)
tree6e4e8010c0ad0bb1eb005364e76fb1bf475cc753 /drivers/video/sh_mobile_hdmi.c
parentf4363b7d88e99497e4241397efee09b106d802c4 (diff)
fbdev: sh_mobile_hdmi: modify flags name to more specific
This patch solve below report from Guennadi 1) > +/* Audio source select */ > +#define HDMI_SRC_MASK (0xF << 0) > +#define HDMI_SRC_I2S (0 << 0) /* default */ > +#define HDMI_SRC_SPDIF (1 << 0) > +#define HDMI_SRC_DSD (2 << 0) > +#define HDMI_SRC_HBR (3 << 0) I would be more specific with these macro names, i.e., include "AUDIO" or "SND" or something similar in them, e.g., HDMI_AUDIO_SRC_I2S. 2) > + case HDMI_SRC_I2S: > + data = (0x0 << 3); > + break; > + case HDMI_SRC_SPDIF: > + data = (0x1 << 3); > + break; > + case HDMI_SRC_DSD: > + data = (0x2 << 3); > + break; > + case HDMI_SRC_HBR: > + data = (0x3 << 3); In all above cases parenthesis are superfluous. Reported-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de> Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Reviewed-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de> Acked-by: Liam Girdwood <lrg@slimlogic.co.uk> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Diffstat (limited to 'drivers/video/sh_mobile_hdmi.c')
-rw-r--r--drivers/video/sh_mobile_hdmi.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/drivers/video/sh_mobile_hdmi.c b/drivers/video/sh_mobile_hdmi.c
index 0acd850f73b5..beb04ef5fd0b 100644
--- a/drivers/video/sh_mobile_hdmi.c
+++ b/drivers/video/sh_mobile_hdmi.c
@@ -389,20 +389,20 @@ static void sh_hdmi_audio_config(struct sh_hdmi *hdmi)
389 * [6:5] set required down sampling rate if required 389 * [6:5] set required down sampling rate if required
390 * [4:3] set required audio source 390 * [4:3] set required audio source
391 */ 391 */
392 switch (pdata->flags & HDMI_SRC_MASK) { 392 switch (pdata->flags & HDMI_SND_SRC_MASK) {
393 default: 393 default:
394 /* fall through */ 394 /* fall through */
395 case HDMI_SRC_I2S: 395 case HDMI_SND_SRC_I2S:
396 data = (0x0 << 3); 396 data = 0x0 << 3;
397 break; 397 break;
398 case HDMI_SRC_SPDIF: 398 case HDMI_SND_SRC_SPDIF:
399 data = (0x1 << 3); 399 data = 0x1 << 3;
400 break; 400 break;
401 case HDMI_SRC_DSD: 401 case HDMI_SND_SRC_DSD:
402 data = (0x2 << 3); 402 data = 0x2 << 3;
403 break; 403 break;
404 case HDMI_SRC_HBR: 404 case HDMI_SND_SRC_HBR:
405 data = (0x3 << 3); 405 data = 0x3 << 3;
406 break; 406 break;
407 } 407 }
408 hdmi_write(hdmi, data, HDMI_AUDIO_SETTING_1); 408 hdmi_write(hdmi, data, HDMI_AUDIO_SETTING_1);