Before, we refused to enable an event with the same name in two
different channels at the same time within a session.
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
*/
list_for_each_entry(event, &chan->session->events, list) {
if (!strcmp(event->desc->name, event_param->name)) {
- ret = -EEXIST;
- goto exist;
+ /*
+ * Allow events with the same name to appear in
+ * different channels.
+ */
+ if (event->chan == chan) {
+ ret = -EEXIST;
+ goto exist;
+ }
}
}
event = kmem_cache_zalloc(event_cache, GFP_KERNEL);