/* Wrapper function to return a ib_mad_port_private structure or NULL for a device/port  */
static struct ib_mad_port_private* ib_get_mad_port(struct ib_device *device, int port_num)
/* Wrapper function to return a ib_mad_port_private structure or NULL for a device/port  */
static struct ib_mad_port_private* ib_get_mad_port(struct ib_device *device, int port_num)
{
	struct ib_mad_port_private *entry;
	unsigned long flags;
	spin_lock_irqsave(&ib_mad_port_list_lock, flags);
	entry = __ib_get_mad_port(device, port_num);
	spin_unlock_irqrestore(&ib_mad_port_list_lock, flags);
	return entry;
}