diff mbox series

[09/40] mfd: ti_am335x_tscadc: Fix style

Message ID 20210825152518.379386-10-miquel.raynal@bootlin.com
State Superseded
Headers show
Series TI AM437X ADC1 | expand

Commit Message

Miquel Raynal Aug. 25, 2021, 3:24 p.m. UTC
These are mostly deffects reported by checkpatch.pl.

Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
---
 drivers/mfd/ti_am335x_tscadc.c | 10 +++++++---
 1 file changed, 7 insertions(+), 3 deletions(-)

Comments

Jonathan Cameron Aug. 30, 2021, 12:49 p.m. UTC | #1
On Wed, 25 Aug 2021 17:24:47 +0200
Miquel Raynal <miquel.raynal@bootlin.com> wrote:

> These are mostly deffects reported by checkpatch.pl.
> 
> Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>

look sensible to me.

Reviewed-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>

> ---
>  drivers/mfd/ti_am335x_tscadc.c | 10 +++++++---
>  1 file changed, 7 insertions(+), 3 deletions(-)
> 
> diff --git a/drivers/mfd/ti_am335x_tscadc.c b/drivers/mfd/ti_am335x_tscadc.c
> index 45262ca7734a..540c6dcef541 100644
> --- a/drivers/mfd/ti_am335x_tscadc.c
> +++ b/drivers/mfd/ti_am335x_tscadc.c
> @@ -140,15 +140,17 @@ static	int ti_tscadc_probe(struct platform_device *pdev)
>  		adc_channels++;
>  		if (val > 7) {
>  			dev_err(&pdev->dev, " PIN numbers are 0..7 (not %d)\n",
> -					val);
> +				val);
>  			return -EINVAL;
>  		}
>  	}
> +
>  	total_channels = tsc_wires + adc_channels;
>  	if (total_channels > 8) {
>  		dev_err(&pdev->dev, "Number of i/p channels more than 8\n");
>  		return -EINVAL;
>  	}
> +
>  	if (total_channels == 0) {
>  		dev_err(&pdev->dev, "Need atleast one channel.\n");
>  		return -EINVAL;
> @@ -170,8 +172,9 @@ static	int ti_tscadc_probe(struct platform_device *pdev)
>  	if (err < 0) {
>  		dev_err(&pdev->dev, "no irq ID is specified.\n");
>  		goto ret;
> -	} else
> +	} else {
>  		tscadc->irq = err;
> +	}
>  
>  	res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
>  	tscadc->tscadc_base = devm_ioremap_resource(&pdev->dev, res);
> @@ -180,7 +183,8 @@ static	int ti_tscadc_probe(struct platform_device *pdev)
>  
>  	tscadc->tscadc_phys_base = res->start;
>  	tscadc->regmap = devm_regmap_init_mmio(&pdev->dev,
> -			tscadc->tscadc_base, &tscadc_regmap_config);
> +					       tscadc->tscadc_base,
> +					       &tscadc_regmap_config);
>  	if (IS_ERR(tscadc->regmap)) {
>  		dev_err(&pdev->dev, "regmap init failed\n");
>  		err = PTR_ERR(tscadc->regmap);
diff mbox series

Patch

diff --git a/drivers/mfd/ti_am335x_tscadc.c b/drivers/mfd/ti_am335x_tscadc.c
index 45262ca7734a..540c6dcef541 100644
--- a/drivers/mfd/ti_am335x_tscadc.c
+++ b/drivers/mfd/ti_am335x_tscadc.c
@@ -140,15 +140,17 @@  static	int ti_tscadc_probe(struct platform_device *pdev)
 		adc_channels++;
 		if (val > 7) {
 			dev_err(&pdev->dev, " PIN numbers are 0..7 (not %d)\n",
-					val);
+				val);
 			return -EINVAL;
 		}
 	}
+
 	total_channels = tsc_wires + adc_channels;
 	if (total_channels > 8) {
 		dev_err(&pdev->dev, "Number of i/p channels more than 8\n");
 		return -EINVAL;
 	}
+
 	if (total_channels == 0) {
 		dev_err(&pdev->dev, "Need atleast one channel.\n");
 		return -EINVAL;
@@ -170,8 +172,9 @@  static	int ti_tscadc_probe(struct platform_device *pdev)
 	if (err < 0) {
 		dev_err(&pdev->dev, "no irq ID is specified.\n");
 		goto ret;
-	} else
+	} else {
 		tscadc->irq = err;
+	}
 
 	res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
 	tscadc->tscadc_base = devm_ioremap_resource(&pdev->dev, res);
@@ -180,7 +183,8 @@  static	int ti_tscadc_probe(struct platform_device *pdev)
 
 	tscadc->tscadc_phys_base = res->start;
 	tscadc->regmap = devm_regmap_init_mmio(&pdev->dev,
-			tscadc->tscadc_base, &tscadc_regmap_config);
+					       tscadc->tscadc_base,
+					       &tscadc_regmap_config);
 	if (IS_ERR(tscadc->regmap)) {
 		dev_err(&pdev->dev, "regmap init failed\n");
 		err = PTR_ERR(tscadc->regmap);