From: Samuel Ortiz Date: Tue, 21 May 2013 16:52:09 +0000 (+0200) Subject: mei: bus: Reset event_cb when disabling a device X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=bbedf2fc207bbd89c109123caee7cf0497030762;p=openwrt%2Fstaging%2Fblogic.git mei: bus: Reset event_cb when disabling a device 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 Signed-off-by: Samuel Ortiz Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/misc/mei/bus.c b/drivers/misc/mei/bus.c index 1e935eacaa7f..9ecd49a7be1b 100644 --- a/drivers/misc/mei/bus.c +++ b/drivers/misc/mei/bus.c @@ -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)