From 24e89d6d7da52f8678dc111ffb0ae3590b678ef0 Mon Sep 17 00:00:00 2001 From: Claudiu Beznea Date: Mon, 25 Jul 2022 16:09:22 +0300 Subject: ASoC: mchp-spdifrx: use single tab indent for structure Use single tab indentation for mchp_spdifrx_mixer_control structure. Signed-off-by: Claudiu Beznea Link: https://lore.kernel.org/r/20220725130925.1781791-3-claudiu.beznea@microchip.com Signed-off-by: Mark Brown --- sound/soc/atmel/mchp-spdifrx.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'sound') diff --git a/sound/soc/atmel/mchp-spdifrx.c b/sound/soc/atmel/mchp-spdifrx.c index 5fc968483f2c..a04f6dd0eaea 100644 --- a/sound/soc/atmel/mchp-spdifrx.c +++ b/sound/soc/atmel/mchp-spdifrx.c @@ -221,11 +221,11 @@ struct mchp_spdifrx_user_data { }; struct mchp_spdifrx_mixer_control { - struct mchp_spdifrx_ch_stat ch_stat[SPDIFRX_CHANNELS]; - struct mchp_spdifrx_user_data user_data[SPDIFRX_CHANNELS]; - bool ulock; - bool badf; - bool signal; + struct mchp_spdifrx_ch_stat ch_stat[SPDIFRX_CHANNELS]; + struct mchp_spdifrx_user_data user_data[SPDIFRX_CHANNELS]; + bool ulock; + bool badf; + bool signal; }; struct mchp_spdifrx_dev { -- cgit v1.2.3 From d346a4ad305bf3f99e5824e0c132fac7e0b53657 Mon Sep 17 00:00:00 2001 From: Claudiu Beznea Date: Mon, 25 Jul 2022 16:09:24 +0300 Subject: ASoC: mchp-spdiftx: return directly ret Avoid having patterns like: int ret; // ... ret = 0; // ... ret = call_function(); if (ret) return ret; return 0; and return directly ret for all cases. Signed-off-by: Claudiu Beznea Link: https://lore.kernel.org/r/20220725130925.1781791-5-claudiu.beznea@microchip.com Signed-off-by: Mark Brown --- sound/soc/atmel/mchp-spdiftx.c | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) (limited to 'sound') diff --git a/sound/soc/atmel/mchp-spdiftx.c b/sound/soc/atmel/mchp-spdiftx.c index d24380046435..516993280792 100644 --- a/sound/soc/atmel/mchp-spdiftx.c +++ b/sound/soc/atmel/mchp-spdiftx.c @@ -341,12 +341,10 @@ static int mchp_spdiftx_trigger(struct snd_pcm_substream *substream, int cmd, ret = regmap_write(dev->regmap, SPDIFTX_MR, mr); spin_unlock(&ctrl->lock); - if (ret) { + if (ret) dev_err(dev->dev, "unable to disable TX: %d\n", ret); - return ret; - } - return 0; + return ret; } static int mchp_spdiftx_hw_params(struct snd_pcm_substream *substream, @@ -847,12 +845,10 @@ static int mchp_spdiftx_probe(struct platform_device *pdev) err = devm_snd_soc_register_component(&pdev->dev, &mchp_spdiftx_component, &mchp_spdiftx_dai, 1); - if (err) { + if (err) dev_err(&pdev->dev, "failed to register component: %d\n", err); - return err; - } - return 0; + return err; } static struct platform_driver mchp_spdiftx_driver = { -- cgit v1.2.3 From 96f6017d652a78e06e34e535526826a22aa69dfa Mon Sep 17 00:00:00 2001 From: Claudiu Beznea Date: Mon, 25 Jul 2022 16:09:25 +0300 Subject: ASoC: mchp-spdiftx: add and remove black line around MODULE_DEVICE_TABLE() Add blank line after MODULE_DEVICE_TABLE() and remove the one before it. Signed-off-by: Claudiu Beznea Link: https://lore.kernel.org/r/20220725130925.1781791-6-claudiu.beznea@microchip.com Signed-off-by: Mark Brown --- sound/soc/atmel/mchp-spdiftx.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'sound') diff --git a/sound/soc/atmel/mchp-spdiftx.c b/sound/soc/atmel/mchp-spdiftx.c index 516993280792..2b2347e29506 100644 --- a/sound/soc/atmel/mchp-spdiftx.c +++ b/sound/soc/atmel/mchp-spdiftx.c @@ -760,8 +760,8 @@ static const struct of_device_id mchp_spdiftx_dt_ids[] = { }, { /* sentinel */ } }; - MODULE_DEVICE_TABLE(of, mchp_spdiftx_dt_ids); + static int mchp_spdiftx_probe(struct platform_device *pdev) { struct device_node *np = pdev->dev.of_node; -- cgit v1.2.3