USB: Clarify that BusManagers do not really have usb_ids.
Instead their IDs are indexes into the stack, and are used primarily for TRACE*() printing, so move the getter function into a "protected" block and rename the variable appropriately.
This commit is contained in:
parent
3a71862e99
commit
decd5b8ff5
@ -14,7 +14,7 @@ BusManager::BusManager(Stack *stack)
|
||||
: fInitOK(false),
|
||||
fStack(stack),
|
||||
fRootHub(NULL),
|
||||
fUSBID((uint32)-1)
|
||||
fStackIndex((uint32)-1)
|
||||
{
|
||||
mutex_init(&fLock, "usb busmanager lock");
|
||||
|
||||
@ -254,7 +254,7 @@ status_t
|
||||
BusManager::Start()
|
||||
{
|
||||
fStack->AddBusManager(this);
|
||||
fUSBID = fStack->IndexOfBusManager(this);
|
||||
fStackIndex = fStack->IndexOfBusManager(this);
|
||||
return B_OK;
|
||||
}
|
||||
|
||||
|
@ -226,9 +226,11 @@ virtual status_t NotifyPipeChange(Pipe *pipe,
|
||||
Hub * GetRootHub() const { return fRootHub; }
|
||||
void SetRootHub(Hub *hub) { fRootHub = hub; }
|
||||
|
||||
usb_id USBID() const { return fUSBID; }
|
||||
virtual const char * TypeName() const = 0;
|
||||
|
||||
protected:
|
||||
usb_id USBID() const { return fStackIndex; }
|
||||
|
||||
protected:
|
||||
bool fInitOK;
|
||||
|
||||
@ -245,7 +247,7 @@ private:
|
||||
Hub * fRootHub;
|
||||
Object * fRootObject;
|
||||
|
||||
usb_id fUSBID;
|
||||
usb_id fStackIndex;
|
||||
};
|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user