RE: [PATCH v7 1/5] usb: phy: add usb phy notify port status API

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

 



Hi Greg,

> > > > > +
> > > > > +     if (!ret) {
> > > > > +             struct usb_device *hdev = hub->hdev;
> > > > > +
> > > > > +             if (hdev && !hdev->parent) {
> > > >
> > > > Why the check for no parent?  Please document that here in a
> comment.
> > >
> > > I will add a comment :
> > > /* Only notify roothub. That is, when hdev->parent is empty. */
> >
> > Also document this that this will only happen for root hub status
> > changes, that's not obvious in the callback name or documentation or
> anywhere else here.
> 
> All usb phy notifications (connection, disconnection) are only for roothub.
> So I don't special to doc this.

I will add the comment:
/*
 * Applies to roothub only. That is, when hdev->parent is
 * empty. Only the roothub will be notified of port state
 * changes, since the USB PHY only cares about changes at
 * the next level.
 */


Thanks,
Stanley




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

  Powered by Linux