Re: [PATCH] usb: gadget: aspeed_udc: use the defined variable to simplify code

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

 



On Tue, Sep 03, 2024 at 08:31:52PM +0800, tangbin wrote:
> Use the defined variable 'dev' to make the code cleaner.
> 
> Signed-off-by: tangbin <tangbin@xxxxxxxxxxxxxxxxxxxx>

Please use your full name, not your email alias.

> ---
>  drivers/usb/gadget/udc/aspeed_udc.c | 26 +++++++++++++-------------
>  1 file changed, 13 insertions(+), 13 deletions(-)
> 
> diff --git a/drivers/usb/gadget/udc/aspeed_udc.c b/drivers/usb/gadget/udc/aspeed_udc.c
> index f4781e611..702d4806c 100644
> --- a/drivers/usb/gadget/udc/aspeed_udc.c
> +++ b/drivers/usb/gadget/udc/aspeed_udc.c
> @@ -1479,7 +1479,7 @@ static int ast_udc_probe(struct platform_device *pdev)
>  	struct ast_udc_dev *udc;
>  	int rc;
>  
> -	udc = devm_kzalloc(&pdev->dev, sizeof(struct ast_udc_dev), GFP_KERNEL);
> +	udc = devm_kzalloc(dev, sizeof(struct ast_udc_dev), GFP_KERNEL);

<snip>

I see the goal, but unless you have this hardware and can test this
change out, I'm going to leave it as-is as nothing should have been
changed here.

sorry,

greg k-h




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

  Powered by Linux