/* ib_register_event_handler() registers an event handler that will be called back when asynchronous IB events occur (as defined in chapter 11 of the InfiniBand Architecture Specification). This callback may occur in interrupt context.  */
int ib_register_event_handler(struct ib_event_handler *event_handler)
/* ib_register_event_handler() registers an event handler that will be called back when asynchronous IB events occur (as defined in chapter 11 of the InfiniBand Architecture Specification). This callback may occur in interrupt context.  */
int ib_register_event_handler(struct ib_event_handler *event_handler)
{
	unsigned long flags;
	spin_lock_irqsave(&event_handler->device->event_handler_lock, flags);
	list_add_tail(&event_handler->list,
		      &event_handler->device->event_handler_list);
	spin_unlock_irqrestore(&event_handler->device->event_handler_lock, flags);
	return 0;
}