Re: [PATCH 1/5] USB chipidea: ci13xxx-imx: create dynamic platformdata

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

 



HI,

Hi,

On Thu, Feb 28, 2013 at 11:57:00AM +0100, Marc Kleine-Budde wrote:
> @@ -107,6 +100,18 @@ static int ci13xxx_imx_probe(struct platform_device *pdev)
>  		&& !usbmisc_ops)
>  		return -EPROBE_DEFER;
>  
> +	pdata = devm_kzalloc(&pdev->dev, sizeof(*pdata), GFP_KERNEL);

this isn't necessary. Look at how platform_device_add_data() is
implemented. It will duplicate whatever you pass to it. Which means you
can change ci13xxx_imx_platdata as much as you want ;-)

> @@ -168,7 +173,7 @@ static int ci13xxx_imx_probe(struct platform_device *pdev)
>  		reg_vbus = NULL;
>  	}
>  
> -	ci13xxx_imx_platdata.phy = data->phy;
> +	pdata->phy = data->phy;

it would be pretty cool to start seeing patches teaching chipidea core
how to handle its own resources (regulators, phys, clocks, etc).

-- 
balbi

Attachment: signature.asc
Description: Digital signature


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

  Powered by Linux