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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxxxxx>

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@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Media Devel]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Linux Wireless Networking]     [Linux Omap]

  Powered by Linux