Skip to contentSkip to conversation

mei: bus: Reset event_cb when disabling a device

PATCH New Samuel Ortiz 1 participant 1 message May 21, 2013

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 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.

---
 drivers/misc/mei/bus.c |    2 ++
 1 file changed, 2 insertions(+)
drivers/misc/mei/bus.c +2 -0
index 1e935ea..9ecd49a 100644
@@ -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)
Signature · 5 lines
1.7.10.4

-- 
Intel Open Source Technology Centre
http://oss.intel.com/