Johannes Erdfelt <[EMAIL PROTECTED]> writes:

> On Sat, Jan 05, 2002, Peter Osterlund <[EMAIL PROTECTED]> wrote:
> > Pete Zaitcev <[EMAIL PROTECTED]> writes:
> > 
> > #define usb_dec_dev_use usb_free_dev
> > 
> > What's the purpose of that define? Just to confuse readers? ;-)
> 
> I take blame for it. It was actually to make more sense to readers.
> 
> The reason I did that was because having a usb_free_dev call in the HCD
> code wouldn't make logical sense. The HCD isn't freeing the device, it's
> just decrementing the reference count it incremented with
> usb_inc_dev_use.
> 
> Just so turns out, the implementation of usb_dec_dev_use and
> usb_free_dev need to be identical because of the reference counting, so
> I just setup a macro.

Wouldn't it make more sense to rename usb_free_dev to usb_dec_dev_use
and get rid of the macro? usb_free_dev isn't unconditionally freeing
the dev, so I think its name is confusing.

-- 
Peter Osterlund - [EMAIL PROTECTED]
http://w1.894.telia.com/~u89404340

_______________________________________________
[EMAIL PROTECTED]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel

Reply via email to