mei: unregister watchdog from mei_stop function
authorTomas Winkler <tomas.winkler@intel.com>
Wed, 27 Mar 2013 14:58:26 +0000 (16:58 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 29 Mar 2013 15:32:21 +0000 (08:32 -0700)
we need to unregister watchdog device both in suspend and remove
as the registration is recreated on reset

Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/misc/mei/init.c
drivers/misc/mei/pci-me.c

index 09a9980303b4a73206b30990a2947a70af98cafe..aced38c9f6a830261e660ae561dce0eaa2301330 100644 (file)
@@ -211,6 +211,9 @@ void mei_stop(struct mei_device *dev)
        mutex_unlock(&dev->device_lock);
 
        flush_scheduled_work();
+
+       mei_watchdog_unregister(dev);
+
 }
 
 
index b8b5c9c3ad0375bab4605b038bcbda60ff970b4f..252b1fd315a88fca45f2e0c8a1d13bca3b10ebc7 100644 (file)
@@ -253,8 +253,6 @@ static void mei_remove(struct pci_dev *pdev)
 
        mei_pdev = NULL;
 
-       mei_watchdog_unregister(dev);
-
        /* disable interrupts */
        mei_disable_interrupts(dev);