mei: bus: Reset event_cb when disabling a device
authorSamuel Ortiz <sameo@linux.intel.com>
Tue, 21 May 2013 16:52:09 +0000 (18:52 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 21 May 2013 16:57:55 +0000 (09:57 -0700)
After cancelling all reads from the disable hook, we need to reset the
event_cb pointer as well or else we won't be able to set a new one up
when re-enabling the device.

Acked-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/misc/mei/bus.c

index 1e935ea..9ecd49a 100644 (file)
@@ -496,6 +496,8 @@ int mei_cl_disable_device(struct mei_cl_device *device)
                }
        }
 
+       device->event_cb = NULL;
+
        mutex_unlock(&dev->device_lock);
 
        if (!device->ops || !device->ops->disable)