Hi, driver core protects us with semaphores during probe/disconnect. We can stop messing with the module usage counts.
Regards Oliver You can import this changeset into BK by piping this whole message to: '| bk receive [path to repository]' or apply the patch as usual. =================================================================== [EMAIL PROTECTED], 2003-03-26 22:14:47+01:00, [EMAIL PROTECTED] - remove reference counts whose job is done by driver core usb.c | 20 +------------------- 1 files changed, 1 insertion(+), 19 deletions(-) diff -Nru a/drivers/usb/core/usb.c b/drivers/usb/core/usb.c --- a/drivers/usb/core/usb.c Wed Mar 26 22:15:31 2003 +++ b/drivers/usb/core/usb.c Wed Mar 26 22:15:32 2003 @@ -88,12 +88,7 @@ if (!driver->probe) return error; - - if (!try_module_get(driver->owner)) { - dev_err (dev, "Can't get a module reference for %s\n", driver->name); - return error; - } - + id = usb_match_id (intf, driver->id_table); if (id) { dev_dbg (dev, "%s - got id\n", __FUNCTION__); @@ -104,8 +99,6 @@ if (!error) intf->driver = driver; - module_put(driver->owner); - return error; } @@ -123,16 +116,6 @@ return -ENODEV; } - if (!try_module_get(driver->owner)) { - // FIXME this happens even when we just rmmod - // drivers that aren't in active use... - dev_err(dev, "Dieing driver still bound to device.\n"); - return -EIO; - } - - /* if we sleep here on an umanaged driver - * the holder of the lock guards against - * module unload */ down(&driver->serialize); if (intf->driver && intf->driver->disconnect) @@ -143,7 +126,6 @@ usb_driver_release_interface(driver, intf); up(&driver->serialize); - module_put(driver->owner); return 0; } =================================================================== This BitKeeper patch contains the following changesets: 1.1550 ## Wrapped with gzip_uu ## begin 664 bkpatch22118 M'XL(`'[EMAIL PROTECTED];,!1]KG_%E?I8A?C:!D*D3.G'M%6=M*I3GZ8]`+Y- M:`B.C.F'Q(^?(5V_Q+HM*S(R^)KK<\\Y-OMP69.=[IFRN"'+]N&SJ9U_I<I4 M%"S-FLJB:NX"8Q<^>&&,#XZ[X?'VBW&V&CE+5(^;.A,A\Y/.4Y<OP<?JZ1X& M\G'$W6]HNG?Q\=/EE\,+QF8S.%ZFU8*^D8/9C&6KN6ZH#%;6I,MNO?8QW`K. M$5&$7(81AJV82*E:C'BF_:,6<7*510F[#G3AW)KL?&.LL\5=4/EO7V217(J( MHY0HVG"BDH2=``88AARX'/LF([EMAIL PROTECTED]'_LQ MRV$$EM;FAGQW19:JG"`W3>5JN%V:FN#:9%#4H#T.R.Y!VPZ8GV*)G4'$A9#L M_(E3-OK'BS&><O9AH)BCPIT1;;S:Y/)QL:C\DJ_KDBI,9*O".%<9)ZTGDUC) MR5OL_39M+Y)`E$*U7/&)&`2U+;_W77<'^1,BQ1.,6N$AJ3:/!%$X$1CG62IY M^":BYSD[7I\2/\>DN.!Q;^"A"H:]O#N%;&%I,=]FRLWZ3=9"P<-88LL]TJBW MME`OC2VG0OV-L?$]C7VH-6GX16Y!1"@3-39-$>[EMAIL PROTECTED]@EP0-Y95$[[^9>]:\P MLK=]\^8\'R1[!Y.?(BI`-HRF5W78!<.Z[NA"IM.;0H^R^2;-,[EMAIL PROTECTED] MXP\>1,%5A-SS'*FMPIA$.TN,R?L?7DU544YUG=I[6!O=E`^G&[EMAIL PROTECTED]>H* M4_42=[OHE<;#Q>[EMAIL PROTECTED]"$+%3SPVR/7:"/`;A.T\1<M^K;OSQSY0O*5_5S7J& /E.JKR.^YGV*NC<$7!P`` ` end ------------------------------------------------------- This SF.net email is sponsored by: The Definitive IT and Networking Event. Be There! NetWorld+Interop Las Vegas 2003 -- Register today! http://ads.sourceforge.net/cgi-bin/redirect.pl?keyn0001en _______________________________________________ [EMAIL PROTECTED] To unsubscribe, use the last form field at: https://lists.sourceforge.net/lists/listinfo/linux-usb-devel