Re: Removing MOD_xxx_USE_COUNT from net drivers

From: Jeff Garzik (jgarzik@mandrakesoft.com)
Date: Wed Oct 18 2000 - 00:34:46 EST


Paul Gortmaker wrote:
> As an alternative to sprinkling MOD_DEC_USE_COUNT throughout the failure
> paths of each net driver init sequence, maybe we should get the module use
> counters out of the drivers entirely. The driver source(s) look cleaner
> and the driver author(s) need not worry about the handling of the count.

At first glance this looks pretty darn good. This also solves any
potential races now and in the future between dev->open() call and
MOD_INC_USE_COUNT.

One small nit: This was done for chrdevs using 'owner' as the name for
the field which takes the value of THIS_MODULE. Just to make things
uniform, use 'owner' here too...

(also, you probably should CC davem@redhat.com directly on all
net-related patches, since he maintains that subsystem..)

        Jeff

-- 
Jeff Garzik                    | The difference between laziness and
Building 1024                  | prioritization is the end result.
MandrakeSoft                   |
-
To unsubscribe from this list: send the line "unsubscribe linux-net" in
the body of a message to majordomo@vger.kernel.org



This archive was generated by hypermail 2b29 : Mon Oct 23 2000 - 21:00:24 EST