fbdev: sh_mobile_hdmi: modify flags name to more specific
authorKuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Thu, 9 Sep 2010 02:48:01 +0000 (11:48 +0900)
committerMark Brown <broonie@opensource.wolfsonmicro.com>
Fri, 10 Sep 2010 15:07:41 +0000 (16:07 +0100)
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>
drivers/video/sh_mobile_hdmi.c
include/video/sh_mobile_hdmi.h

index 0acd850f73b593a9effac178f00019d8177bef50..beb04ef5fd0bc6de7b28be4ab8a11d61edc5a5d3 100644 (file)
@@ -389,20 +389,20 @@ static void sh_hdmi_audio_config(struct sh_hdmi *hdmi)
         * [6:5] set required down sampling rate if required
         * [4:3] set required audio source
         */
-       switch (pdata->flags & HDMI_SRC_MASK) {
+       switch (pdata->flags & HDMI_SND_SRC_MASK) {
        default:
                /* fall through */
-       case HDMI_SRC_I2S:
-               data = (0x0 << 3);
+       case HDMI_SND_SRC_I2S:
+               data = 0x0 << 3;
                break;
-       case HDMI_SRC_SPDIF:
-               data = (0x1 << 3);
+       case HDMI_SND_SRC_SPDIF:
+               data = 0x1 << 3;
                break;
-       case HDMI_SRC_DSD:
-               data = (0x2 << 3);
+       case HDMI_SND_SRC_DSD:
+               data = 0x2 << 3;
                break;
-       case HDMI_SRC_HBR:
-               data = (0x3 << 3);
+       case HDMI_SND_SRC_HBR:
+               data = 0x3 << 3;
                break;
        }
        hdmi_write(hdmi, data, HDMI_AUDIO_SETTING_1);
index 929c2d3147bc10b9d7a525f5d7310c279f283b2d..1e1aa54ab2e45bad0c1d6841572ba84ff0e912a3 100644 (file)
@@ -23,11 +23,11 @@ struct device;
  */
 
 /* 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)
+#define HDMI_SND_SRC_MASK      (0xF << 0)
+#define HDMI_SND_SRC_I2S       (0 << 0) /* default */
+#define HDMI_SND_SRC_SPDIF     (1 << 0)
+#define HDMI_SND_SRC_DSD       (2 << 0)
+#define HDMI_SND_SRC_HBR       (3 << 0)
 
 struct sh_mobile_hdmi_info {
        struct sh_mobile_lcdc_chan_cfg  *lcd_chan;