Thread (1 message) 1 message, 1 author, 2016-01-19

Re: [PATCH v3 1/1] USB: core: let USB device know device node

From: Peter Chen <hidden>
Date: 2016-01-19 02:52:54
Also in: linux-arm-kernel

On Mon, Jan 18, 2016 at 11:39:06AM -0500, Alan Stern wrote:
On Mon, 18 Jan 2016, Peter Chen wrote:
quoted
quoted
quoted
Why can't the root_hub reuse dev->dev.of_node?
Indeed, there's no need to add an .of_node field to struct usb_device, 
since the embedded struct device already contains an .of_node field.
No, the usb_device needs the .of_node field.
It already _has_ an .of_node field, in its embedded struct device.
quoted
The devices belong to platform bus contains device node.
The devices (usb device) belong to USB bus which are created
dynamically do not contain device node.
I don't know what you mean.  struct usb_device _does_ contain an 
embedded struct device.  It doesn't matter the structures are created 
dynamically, statically, or any other way; this field is part of the 
structure definition.

Suppose udev is a pointer to struct usb_device.  Then udev->dev is a
struct device and udev->dev.of_node is a pointer to struct device_node.  
You don't need to add a new udev->of_node field; just use
udev->dev.of_node instead.
Yes, you are right.

-- 

Best Regards,
Peter Chen
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help