Hi, the patch looks good. I'll give it a paranoia try and then send it to Linus and Marcelo.
Petko Chris Rankin wrote: > Hi, > > I have noticed that the Pegasus II driver in the Linux 2.4.16 kernel > uses the old Linux 2.2-style module locking. I have attached a patch > that updates the driver to the new 2.4-style module locking instead. > > Cheers, > Chris > > --- drivers/usb/pegasus.c.orig Tue Dec 4 13:35:54 2001 > +++ drivers/usb/pegasus.c Tue Dec 4 13:37:23 2001 > @@ -713,10 +713,8 @@ > pegasus_t *pegasus = (pegasus_t *)net->priv; > int res; > > - MOD_INC_USE_COUNT; > if ( (res = enable_net_traffic(net, pegasus->usb)) ) { > err("can't enable_net_traffic() - %d", res); > - MOD_DEC_USE_COUNT; > return -EIO; > } > FILL_BULK_URB( &pegasus->rx_urb, pegasus->usb, > @@ -755,7 +753,6 @@ > #ifdef PEGASUS_USE_INTR > usb_unlink_urb( &pegasus->intr_urb ); > #endif > - MOD_DEC_USE_COUNT; > > return 0; > } > @@ -868,6 +865,7 @@ > pegasus->usb = dev; > pegasus->net = net; > net->priv = pegasus; > + net->owner = THIS_MODULE; > net->open = pegasus_open; > net->stop = pegasus_close; > net->watchdog_timeo = PEGASUS_TX_TIMEOUT; > > _______________________________________________ > [EMAIL PROTECTED] > To unsubscribe, use the last form field at: > https://lists.sourceforge.net/lists/listinfo/linux-usb-devel > > _______________________________________________ [EMAIL PROTECTED] To unsubscribe, use the last form field at: https://lists.sourceforge.net/lists/listinfo/linux-usb-devel