| From e9dfbc63375191f9add9b96b1cd5a7dd2db3ef13 Mon Sep 17 00:00:00 2001 |
| From: Nicolin Chen <Guangyu.Chen@freescale.com> |
| Date: Thu, 24 Apr 2014 19:14:00 +0800 |
| Subject: ASoC: simple-card: Improve coding style |
| |
| Improve indentation and space. |
| |
| Signed-off-by: Nicolin Chen <Guangyu.Chen@freescale.com> |
| Signed-off-by: Mark Brown <broonie@linaro.org> |
| (cherry picked from commit 781cbebed750af26341e551b785048a1ea347c5e) |
| Signed-off-by: Simon Horman <horms+renesas@verge.net.au> |
| --- |
| sound/soc/generic/simple-card.c | 23 +++++++++++------------ |
| 1 file changed, 11 insertions(+), 12 deletions(-) |
| |
| diff --git a/sound/soc/generic/simple-card.c b/sound/soc/generic/simple-card.c |
| index c091557666d5..98f97e543c29 100644 |
| --- a/sound/soc/generic/simple-card.c |
| +++ b/sound/soc/generic/simple-card.c |
| @@ -66,8 +66,7 @@ err: |
| |
| static int asoc_simple_card_dai_init(struct snd_soc_pcm_runtime *rtd) |
| { |
| - struct simple_card_data *priv = |
| - snd_soc_card_get_drvdata(rtd->card); |
| + struct simple_card_data *priv = snd_soc_card_get_drvdata(rtd->card); |
| struct snd_soc_dai *codec = rtd->codec_dai; |
| struct snd_soc_dai *cpu = rtd->cpu_dai; |
| struct simple_dai_props *dai_props; |
| @@ -177,7 +176,7 @@ static int simple_card_dai_link_of(struct device_node *node, |
| goto dai_link_of_err; |
| |
| dai_props->cpu_dai.fmt = daifmt; |
| - switch (((np == bitclkmaster)<<4)|(np == framemaster)) { |
| + switch (((np == bitclkmaster) << 4) | (np == framemaster)) { |
| case 0x11: |
| dai_props->cpu_dai.fmt |= SND_SOC_DAIFMT_CBS_CFS; |
| break; |
| @@ -218,7 +217,7 @@ static int simple_card_dai_link_of(struct device_node *node, |
| (daifmt & ~SND_SOC_DAIFMT_CLOCK_MASK); |
| } else { |
| dai_props->codec_dai.fmt = daifmt; |
| - switch (((np == bitclkmaster)<<4)|(np == framemaster)) { |
| + switch (((np == bitclkmaster) << 4) | (np == framemaster)) { |
| case 0x11: |
| dai_props->codec_dai.fmt |= SND_SOC_DAIFMT_CBM_CFM; |
| break; |
| @@ -235,8 +234,8 @@ static int simple_card_dai_link_of(struct device_node *node, |
| } |
| |
| if (!dai_link->cpu_dai_name || !dai_link->codec_dai_name) { |
| - ret = -EINVAL; |
| - goto dai_link_of_err; |
| + ret = -EINVAL; |
| + goto dai_link_of_err; |
| } |
| |
| /* simple-card assumes platform == cpu */ |
| @@ -417,10 +416,10 @@ static int asoc_simple_card_probe(struct platform_device *pdev) |
| return -EINVAL; |
| } |
| |
| - if (!cinfo->name || |
| - !cinfo->codec_dai.name || |
| - !cinfo->codec || |
| - !cinfo->platform || |
| + if (!cinfo->name || |
| + !cinfo->codec_dai.name || |
| + !cinfo->codec || |
| + !cinfo->platform || |
| !cinfo->cpu_dai.name) { |
| dev_err(dev, "insufficient asoc_simple_card_info settings\n"); |
| return -EINVAL; |
| @@ -464,11 +463,11 @@ MODULE_DEVICE_TABLE(of, asoc_simple_of_match); |
| |
| static struct platform_driver asoc_simple_card = { |
| .driver = { |
| - .name = "asoc-simple-card", |
| + .name = "asoc-simple-card", |
| .owner = THIS_MODULE, |
| .of_match_table = asoc_simple_of_match, |
| }, |
| - .probe = asoc_simple_card_probe, |
| + .probe = asoc_simple_card_probe, |
| }; |
| |
| module_platform_driver(asoc_simple_card); |
| -- |
| 2.1.2 |
| |