Re: [PATCH 1/6] usb: dwc3-omap: use of_platform API to create dwc3 core pdev

2012-10-01 Thread Felipe Balbi
Hi,

On Fri, Sep 28, 2012 at 07:01:04PM +0530, ABRAHAM, KISHON VIJAY wrote:
 Hi,
 
 On Fri, Sep 28, 2012 at 6:27 PM, Felipe Balbi ba...@ti.com wrote:
  Hi,
 
  On Fri, Sep 28, 2012 at 06:23:10PM +0530, Kishon Vijay Abraham I wrote:
  Used of_platform_populate() to populate dwc3 core platform_device
  from device tree data. Since now the allocation of unique device id is
  handled be of_*, removed the call to dwc3_get_device_id.
 
  Signed-off-by: Kishon Vijay Abraham I kis...@ti.com
 
  I think it's best if you split the use of device_for_each_child() from
  this patch. So first do the device_for_each_child() part, then later use
  of_platform_populate().
 
 I think it's better to have it both together as of_platform_populate
 will create the device and the device_for_each_child() part will
 delete it on error conditions and during driver removal.
 In this patch the first device_for_each_child() comes in error
 condition and it is not needed if we have not created the device using
 of_platform_populate.

We are already parent of a device and we already handle child removal
manually. You can change the current implementation to use
device_for_each_child() and on a later patch introduce
of_platform_populate().

-- 
balbi


signature.asc
Description: Digital signature


Re: [PATCH 1/6] usb: dwc3-omap: use of_platform API to create dwc3 core pdev

2012-09-28 Thread Felipe Balbi
Hi,

On Fri, Sep 28, 2012 at 06:23:10PM +0530, Kishon Vijay Abraham I wrote:
 Used of_platform_populate() to populate dwc3 core platform_device
 from device tree data. Since now the allocation of unique device id is
 handled be of_*, removed the call to dwc3_get_device_id.
 
 Signed-off-by: Kishon Vijay Abraham I kis...@ti.com

I think it's best if you split the use of device_for_each_child() from
this patch. So first do the device_for_each_child() part, then later use
of_platform_populate().

-- 
balbi


signature.asc
Description: Digital signature


Re: [PATCH 1/6] usb: dwc3-omap: use of_platform API to create dwc3 core pdev

2012-09-28 Thread ABRAHAM, KISHON VIJAY
Hi,

On Fri, Sep 28, 2012 at 6:27 PM, Felipe Balbi ba...@ti.com wrote:
 Hi,

 On Fri, Sep 28, 2012 at 06:23:10PM +0530, Kishon Vijay Abraham I wrote:
 Used of_platform_populate() to populate dwc3 core platform_device
 from device tree data. Since now the allocation of unique device id is
 handled be of_*, removed the call to dwc3_get_device_id.

 Signed-off-by: Kishon Vijay Abraham I kis...@ti.com

 I think it's best if you split the use of device_for_each_child() from
 this patch. So first do the device_for_each_child() part, then later use
 of_platform_populate().

I think it's better to have it both together as of_platform_populate
will create the device and the device_for_each_child() part will
delete it on error conditions and during driver removal.
In this patch the first device_for_each_child() comes in error
condition and it is not needed if we have not created the device using
of_platform_populate.

Thanks
Kishon
--
To unsubscribe from this list: send the line unsubscribe linux-usb in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html