drivers/memstick/host/rtsx_pci_ms.c: add cancel_work when remove driver

Add cancel_work_sync() in rtsx_pci_ms_drv_remove() to cancel pending
request work when removing the driver.

Signed-off-by: Micky Ching <[email protected]>
Cc: Samuel Ortiz <[email protected]> says:
Cc: Maxim Levitsky <[email protected]>
Cc: Greg Kroah-Hartman <[email protected]>
Cc: Alex Dubov <[email protected]>
Cc: Roger Tseng <[email protected]>
Cc: Wei WANG <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
This commit is contained in:
Micky Ching 2014-06-23 13:22:04 -07:00 • committed by Linus Torvalds
commit b6226b45c6

View file

@ -601,6 +601,7 @@ static int rtsx_pci_ms_drv_remove(struct platform_device *pdev)
pcr->slots[RTSX_MS_CARD].card_event = NULL;
msh = host->msh;
host->eject = true;
cancel_work_sync(&host->handle_req);
mutex_lock(&host->host_mutex);
if (host->req) {