• Christoph Hellwig's avatar
    [PATCH] remove MOD_IN_USE · ca58c4b6
    Christoph Hellwig authored
    Another left-over from ancient module code, it was supposed to return
    non-zero if the module has a use count, but currently it always
    evaluates to 0.
    
    There are a few users of different types:
    (1)  ioctl that perform a while(MOD_IN_USE) MOD_DEC_USE_COUNT loop.
         Just rip them out, we now have forced module unloading.
    (2)  printk's that moan if the use-count in not zero in the exitfunc.
         Just rip them out, this can't happen.
    (3)  if(MOD_IN_USE) MOD_DEC_USE_COUNT constructs in ->close of a few
         serial drivers.  Just remove the conditional, we did a
         MOD_INC_USE_COUNT in ->open.
    (4)  This one is interesting:  drivers/sbus/char/display7seg.c uses
         the module use count to track openers.  Replace this with an
         atomic_t.
    
    In addition remove tons of stale comments in network driver that aren't
    understandable for anyone who doesn't know ancient Linux module semantics.
    ca58c4b6
mpc.c 39 KB