[PATCH 05/10] usb: dwc3-generic: Use dev_read_addr() instead of devfdt_get_addr()
Kever Yang
kever.yang at rock-chips.com
Thu Feb 20 02:51:11 CET 2020
Hi Marek,
On 2020/2/20 上午1:07, Marek Vasut wrote:
> On 2/19/20 2:54 AM, Kever Yang wrote:
>> Use more common API so that we can support live DT.
>>
>> Signed-off-by: Kever Yang <kever.yang at rock-chips.com>
>> ---
>>
>> drivers/usb/dwc3/dwc3-generic.c | 8 ++++----
>> 1 file changed, 4 insertions(+), 4 deletions(-)
>>
>> diff --git a/drivers/usb/dwc3/dwc3-generic.c b/drivers/usb/dwc3/dwc3-generic.c
>> index 820cc7075c..ced0f53bfd 100644
>> --- a/drivers/usb/dwc3/dwc3-generic.c
>> +++ b/drivers/usb/dwc3/dwc3-generic.c
>> @@ -88,17 +88,17 @@ static int dwc3_generic_remove(struct udevice *dev,
>> static int dwc3_generic_ofdata_to_platdata(struct udevice *dev)
>> {
>> struct dwc3_generic_plat *plat = dev_get_platdata(dev);
>> - int node = dev_of_offset(dev);
>> + ofnode node = dev->node;
> Can't you just do ofnode_of_offset() here, once , instead of having it
> all over the function ?
The "all over the function" is only twice, and this convert will removed
at follow up patch which
update the function parameter from offset to ofnode.
So I think this change is acceptable for this patch.
Thanks,
- Kever
More information about the U-Boot
mailing list