diff mbox

[4/7] iio/ti_am335x_adc: remove the else case

Message ID 1369256897-25984-4-git-send-email-bigeasy@linutronix.de (mailing list archive)
State New, archived
Headers show

Commit Message

Sebastian Andrzej Siewior May 22, 2013, 9:08 p.m. UTC
The DT support added in ("iio: adc: am335x: Add DT support")
added an else case which shifts the code to the righ for no reaseon.
This patch simply removes the pointless else case and shifts the code
back to the left.

Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
---
 drivers/iio/adc/ti_am335x_adc.c |   13 +++++--------
 1 file changed, 5 insertions(+), 8 deletions(-)

Comments

Jonathan Cameron May 22, 2013, 9:55 p.m. UTC | #1
On 05/22/2013 10:08 PM, Sebastian Andrzej Siewior wrote:
> The DT support added in ("iio: adc: am335x: Add DT support")
> added an else case which shifts the code to the righ for no reaseon.
> This patch simply removes the pointless else case and shifts the code
> back to the left.
> 
> Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>

Either I am going completely mad or I never took the original patch.
I'm not entirely sure I can remember why though.  I think there were
issues with another patch in the series and so I was waiting for
a reposting that never happened.  Looking back I think the debate
was curriously enough whether it made sense ot have the platform_data
support in there or not.

Did anyone every take any of that series?  Which tree did you base these on?
> ---
>  drivers/iio/adc/ti_am335x_adc.c |   13 +++++--------
>  1 file changed, 5 insertions(+), 8 deletions(-)
> 
> diff --git a/drivers/iio/adc/ti_am335x_adc.c b/drivers/iio/adc/ti_am335x_adc.c
> index f258eb0..ac78672 100644
> --- a/drivers/iio/adc/ti_am335x_adc.c
> +++ b/drivers/iio/adc/ti_am335x_adc.c
> @@ -214,14 +214,11 @@ static int tiadc_probe(struct platform_device *pdev)
>  		node = of_get_child_by_name(node, "adc");
>  		if (!node)
>  			return  -EINVAL;
> -		else {
> -			err = of_property_read_u32(node,
> -					"ti,adc-channels", &val32);
> -			if (err < 0)
> -				goto err_free_device;
> -			else
> -				adc_dev->channels = val32;
> -		}
> +		err = of_property_read_u32(node,
> +				"ti,adc-channels", &val32);
> +		if (err < 0)
> +			goto err_free_device;
> +		adc_dev->channels = val32;
>  	}
>  
>  	indio_dev->dev.parent = &pdev->dev;
> 
--
To unsubscribe from this list: send the line "unsubscribe linux-input" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Sebastian Andrzej Siewior May 31, 2013, 7:43 a.m. UTC | #2
On 05/22/2013 11:55 PM, Jonathan Cameron wrote:
> Did anyone every take any of that series?  Which tree did you base these on?

I am very sorry for not replying earlier, I somehow overlooked your
email until now. Saying that I assumed that the series I relied on was
merged. Later I've been told that this is not the case and I rebased
everything on top of v3.10-rc3. So please ignore this series, there are
two new :)

Sebastian
--
To unsubscribe from this list: send the line "unsubscribe linux-input" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/drivers/iio/adc/ti_am335x_adc.c b/drivers/iio/adc/ti_am335x_adc.c
index f258eb0..ac78672 100644
--- a/drivers/iio/adc/ti_am335x_adc.c
+++ b/drivers/iio/adc/ti_am335x_adc.c
@@ -214,14 +214,11 @@  static int tiadc_probe(struct platform_device *pdev)
 		node = of_get_child_by_name(node, "adc");
 		if (!node)
 			return  -EINVAL;
-		else {
-			err = of_property_read_u32(node,
-					"ti,adc-channels", &val32);
-			if (err < 0)
-				goto err_free_device;
-			else
-				adc_dev->channels = val32;
-		}
+		err = of_property_read_u32(node,
+				"ti,adc-channels", &val32);
+		if (err < 0)
+			goto err_free_device;
+		adc_dev->channels = val32;
 	}
 
 	indio_dev->dev.parent = &pdev->dev;