Re: [PATCH 01/16] mfd: omap-usb-tll: Avoid creating copy of platform data

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

 



On Thu, Nov 15, 2012 at 04:33:59PM +0200, Roger Quadros wrote:
> Just a pointer to the platform data should suffice.
> 
> Signed-off-by: Roger Quadros <rogerq@xxxxxx>

this looks fine to me:

Acked-by: Felipe Balbi <balbi@xxxxxx>

> ---
>  drivers/mfd/omap-usb-tll.c |    9 ++++-----
>  1 files changed, 4 insertions(+), 5 deletions(-)
> 
> diff --git a/drivers/mfd/omap-usb-tll.c b/drivers/mfd/omap-usb-tll.c
> index 4b7757b..d1750a4 100644
> --- a/drivers/mfd/omap-usb-tll.c
> +++ b/drivers/mfd/omap-usb-tll.c
> @@ -98,7 +98,7 @@
>  struct usbtll_omap {
>  	struct clk				*usbtll_p1_fck;
>  	struct clk				*usbtll_p2_fck;
> -	struct usbtll_omap_platform_data	platdata;
> +	struct usbtll_omap_platform_data	*pdata;
>  	/* secure the register updates */
>  	spinlock_t				lock;
>  };
> @@ -223,8 +223,7 @@ static int __devinit usbtll_omap_probe(struct platform_device *pdev)
>  
>  	spin_lock_init(&tll->lock);
>  
> -	for (i = 0; i < OMAP3_HS_USB_PORTS; i++)
> -		tll->platdata.port_mode[i] = pdata->port_mode[i];
> +	tll->pdata = pdata;
>  
>  	tll->usbtll_p1_fck = clk_get(dev, "usb_tll_hs_usb_ch0_clk");
>  	if (IS_ERR(tll->usbtll_p1_fck)) {
> @@ -362,7 +361,7 @@ static int __devexit usbtll_omap_remove(struct platform_device *pdev)
>  static int usbtll_runtime_resume(struct device *dev)
>  {
>  	struct usbtll_omap			*tll = dev_get_drvdata(dev);
> -	struct usbtll_omap_platform_data	*pdata = &tll->platdata;
> +	struct usbtll_omap_platform_data	*pdata = tll->pdata;
>  	unsigned long				flags;
>  
>  	dev_dbg(dev, "usbtll_runtime_resume\n");
> @@ -388,7 +387,7 @@ static int usbtll_runtime_resume(struct device *dev)
>  static int usbtll_runtime_suspend(struct device *dev)
>  {
>  	struct usbtll_omap			*tll = dev_get_drvdata(dev);
> -	struct usbtll_omap_platform_data	*pdata = &tll->platdata;
> +	struct usbtll_omap_platform_data	*pdata = tll->pdata;
>  	unsigned long				flags;
>  
>  	dev_dbg(dev, "usbtll_runtime_suspend\n");
> -- 
> 1.7.4.1
> 

-- 
balbi

Attachment: signature.asc
Description: Digital signature


[Index of Archives]     [Linux Arm (vger)]     [ARM Kernel]     [ARM MSM]     [Linux Tegra]     [Linux WPAN Networking]     [Linux Wireless Networking]     [Maemo Users]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite Trails]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux