Re: [PATCH v3 5/5] usb :fsl: Change string format for errata property

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

 



On Wed, 23 Jan 2019, Yinbo Zhu wrote:

> From: Nikhil Badola <nikhil.badola@xxxxxxxxxxxxx>
> 
> Remove USB errata checking code from driver. Applicability of erratum
> is retrieved by reading corresponding property in device tree.
> This property is written during device tree fixup.
> 
> Signed-off-by: Ramneek Mehresh <ramneek.mehresh@xxxxxxxxxxxxx>
> Signed-off-by: Nikhil Badola <nikhil.badola@xxxxxxxxxxxxx>
> Signed-off-by: Yinbo Zhu <yinbo.zhu@xxxxxxx>
> ---
>  drivers/usb/host/fsl-mph-dr-of.c |   14 ++++----------
>  1 files changed, 4 insertions(+), 10 deletions(-)
> 
> diff --git a/drivers/usb/host/fsl-mph-dr-of.c b/drivers/usb/host/fsl-mph-dr-of.c
> index bdc8812..ae8f60f 100644
> --- a/drivers/usb/host/fsl-mph-dr-of.c
> +++ b/drivers/usb/host/fsl-mph-dr-of.c
> @@ -224,16 +224,10 @@ static int fsl_usb2_mph_dr_of_probe(struct platform_device *ofdev)
>  		of_property_read_bool(np, "fsl,usb-erratum-a005275");
>  	pdata->has_fsl_erratum_a005697 =
>  		of_property_read_bool(np, "fsl,usb_erratum-a005697");
> -
> -	if (of_get_property(np, "fsl,usb_erratum_14", NULL))
> -		pdata->has_fsl_erratum_14 = 1;
> -	else
> -		pdata->has_fsl_erratum_14 = 0;
> -
> -	if (of_get_property(np, "fsl,erratum_a006918", NULL))
> -		pdata->has_fsl_erratum_a006918 = 1;
> -	else
> -		pdata->has_fsl_erratum_a006918 = 0;
> +	pdata->has_fsl_erratum_a006918 =
> +		of_property_read_bool(np, "fsl,usb_erratum-a006918");
> +	pdata->has_fsl_erratum_14 =
> +		of_property_read_bool(np, "fsl,usb_erratum-14");

Why go to the trouble of adding bad code for has_fsl_erratum_a006918 in 
patch 4/5 if you're going to change that code here?  Why not just add 
the correct code in the first place?

Alan Stern

>  
>  	/*
>  	 * Determine whether phy_clk_valid needs to be checked
> 




[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux