UPSTREAM: staging: gdm72xx: cancel work when driver unloads
authorDevendra Naga <devendra.aaru@gmail.com>
Sat, 13 Apr 2013 14:46:51 +0000 (20:16 +0530)
committerChromeBot <chrome-bot@google.com>
Wed, 1 May 2013 23:39:51 +0000 (16:39 -0700)
cancel the work function at driver unload stage and remove
the function from the queue

Cc: Ben Chan <benchan@chromium.org>
Signed-off-by: Devendra Naga <devendra.aaru@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
(cherry picked from commit c0352cb71d3d573a33af92d320f29f1c79d71b8b)

Change-Id: I8c4e522270b4acad07d125398b1afe4a14810f16
Signed-off-by: Ben Chan <benchan@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/49427
Reviewed-by: Paul Stewart <pstew@chromium.org>
Reviewed-by: Olof Johansson <olofj@chromium.org>
drivers/staging/gdm72xx/gdm_sdio.c

index 8b8ed98..6ccb41f 100644 (file)
@@ -693,6 +693,7 @@ static void sdio_wimax_remove(struct sdio_func *func)
        struct phy_dev *phy_dev = sdio_get_drvdata(func);
        struct sdiowm_dev *sdev = phy_dev->priv_dev;
 
+       cancel_work_sync(&sdev->ws);
        if (phy_dev->netdev)
                unregister_wimax_device(phy_dev);
        sdio_claim_host(func);