Re: [PATCH 22/39] usb: Make core allocate resources per PCI-device.

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

 



On Sun, Mar 13, 2011 at 11:55:07PM -0700, Dmitry Torokhov wrote:
> On Sun, Mar 13, 2011 at 09:14:10PM -0700, Sarah Sharp wrote:
> >  
> > +int usb_hcd_is_primary_hcd(struct usb_hcd *hcd)
> 
> We have 'bool' so why not use it?

Patches welcome. :)

> > +{
> > +	if (!hcd->primary_hcd)
> > +		return 1;
> 
> 		return true;
> 
> Also, this is confusing... Shouldn't we always assign primary_hcd
> pointer to itself, regardless of the controller kind?

I did that because eventually we want to make hcd->shared_hcd go away.
If we can check if hcd->primary_hcd is non-NULL as a way of seeing if
the PCI device is shared between two roothubs, that might be handy in
the PCI USB core initialization and tear down routines.

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


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

  Powered by Linux