Skip to contentSkip to conversation

[3.10] mei: bus: Reset event_cb when disabling a device

PATCH In review Samuel Ortiz 3 participants 4 messages May 21, 2013

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

PATCH 1/1 [3.10] 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/
#1 lore raw
Quoted 9 lines

-----Original Message-----
From: Samuel Ortiz [mailto:[email protected]]
Sent: Tuesday, May 21, 2013 16:58
To: Winkler, Tomas
Cc: linux-kernel
Subject: [PATCH] [3.10] mei: bus: Reset event_cb when disabling a device

Quoted 5 lines

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.

#2 lore raw
Quoted 9 lines · Tomas
Quoted 9 lines

-----Original Message-----
From: Samuel Ortiz [mailto:[email protected]]
Sent: Tuesday, May 21, 2013 16:58
To: Winkler, Tomas
Cc: linux-kernel
Subject: [PATCH] [3.10] mei: bus: Reset event_cb when disabling a device

Quoted 6 lines
Quoted 5 lines

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.

Greg, I did not initially Cc you and now you don't actually have the patch, sorry.
Let me re-send the patch with Tomas ACK added.

Cheers,
Samuel.

Signature · 2 lines
Intel Open Source Technology Centre
http://oss.intel.com/
#3 lore raw
In reply to Winkler, Tomas
Quoted 9 lines · Tomas
Quoted 9 lines

-----Original Message-----
From: Samuel Ortiz [mailto:[email protected]]
Sent: Tuesday, May 21, 2013 16:58
To: Winkler, Tomas
Cc: linux-kernel
Subject: [PATCH] [3.10] mei: bus: Reset event_cb when disabling a device

Quoted 6 lines
Quoted 5 lines

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.

Nice, but can someone actually send me the patch to apply?

thanks,

greg k-h