On Mon, May 13, 2002, Greg KH <[EMAIL PROTECTED]> wrote:
> On Mon, May 13, 2002 at 04:26:36PM -0400, Johannes Erdfelt wrote:
> > 
> > It's easy with the patch I sent to revert it to the 2.4 method of
> > reference counting:
> > 
> > --- linux-2.5.15/drivers/usb/core/devio.c.old       Mon May 13 16:17:55 2002
> > +++ linux-2.5.15/drivers/usb/core/devio.c   Mon May 13 16:22:25 2002
> > @@ -502,6 +502,7 @@
> >     ret = -ENOMEM;
> >     if (!(ps = kmalloc(sizeof(struct dev_state), GFP_KERNEL)))
> >             goto out;
> > +   usb_inc_dev_use(dev);
> >     ret = 0;
> >     ps->dev = dev;
> >     ps->file = file;
> > @@ -538,6 +539,7 @@
> >     unlock_kernel();
> >     destroy_all_async(ps);
> >     kfree(ps);
> > +   usb_dec_dev_use(dev);
> >          return 0;
> >  }
> 
> That should be usb_get_dev(dev) and usb_put_dev(dev) now :)

Yes. I couldn't remember the exact name of the renamed calls when I
wrote this patch so I just used something I knew people would understand
the meaning of :)

Thanks for the correction.

> And yes, this proves my point too, the patch will stay.

I haven't compiled the above patch, let along tested it yet. I also think
there may be some other situations where we may need something similar.

I'd like to do a code review as well as test the patch. Can I send you a
new patch, relative to the patch you sent out with the usb_{get,put}_dev
changes, in the next day or two?

JE


_______________________________________________________________

Have big pipes? SourceForge.net is looking for download mirrors. We supply
the hardware. You get the recognition. Email Us: [EMAIL PROTECTED]
_______________________________________________
[EMAIL PROTECTED]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel

Reply via email to