staging: mt7621-mmc: Fix warning when reloading module with debug msgs enabled
authorGeorge Hilliard <thirtythreeforty@gmail.com>
Wed, 20 Mar 2019 22:42:03 +0000 (16:42 -0600)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 22 Mar 2019 14:20:27 +0000 (15:20 +0100)
commitf2778bb3cb6c7544578c45688f3d5bcb09e0ac87
tree29ca29cd4d8d7a95a40f65c03257de5a10af9607
parent561fb35a9d04ca7d1a5b955bcac50c6c4f49227d
staging: mt7621-mmc: Fix warning when reloading module with debug msgs enabled

The kernel complained:

    [  510.277151] WARNING: CPU: 0 PID: 395 at fs/proc/generic.c:360 proc_register+0xf0/0x108
    [  510.292891] proc_dir_entry '/proc/msdc_debug' already registered

when doing a modprobe/rmmod/modprobe of this module if debug messages
are compiled in.  Fix this by removing the proc entry when the module is
unloaded.

Signed-off-by: George Hilliard <thirtythreeforty@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/mt7621-mmc/dbg.c
drivers/staging/mt7621-mmc/dbg.h
drivers/staging/mt7621-mmc/sd.c