]> git.baikalelectronics.ru Git - kernel.git/commit
staging: dgap: use remove function
authorSudip Mukherjee <sudipm.mukherjee@gmail.com>
Thu, 7 May 2015 11:12:21 +0000 (16:42 +0530)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 10 May 2015 13:12:09 +0000 (15:12 +0200)
commit6b04ecd4f48d5e0b66efa50b5de06b35e1634c78
treea5689958561586ad6853c1fbfa91d39aea2e33fd
parent5f23e77f2e71be183da8a8bda1fdc6338137c804
staging: dgap: use remove function

the remove callback will be called in two cases, 1) if the driver is
removed and 2) if the pci device is removed. as of now all the board
cleanups were being done in the module unload section so if the module
is unloaded everything works. But if the pci device is removed then the
loaded driver will be left in an inconsistent state.
So moved the cleanups in the remove callback and since there was no
reference of dgap_driver in remove_one(), so had to define the
pci_driver in the function.

Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/dgap/dgap.c