/* Returns: Pointer to the indicator to be used on success ERR_PTR() if registration failed  */
void* s390_register_adapter_interrupt(adapter_int_handler_t handler, void *drv_data, u8 isc)
/* Returns: Pointer to the indicator to be used on success ERR_PTR() if registration failed  */
void* s390_register_adapter_interrupt(adapter_int_handler_t handler, void *drv_data, u8 isc)
{
	struct airq_t *airq;
	char dbf_txt[16];
	int ret;
	if (isc > MAX_ISC)
		return ERR_PTR(-EINVAL);
	airq = kmalloc(sizeof(struct airq_t), GFP_KERNEL);
	if (!airq) {
		ret = -ENOMEM;
		goto out;
	}
	airq->handler = handler;
	airq->drv_data = drv_data;
	ret = register_airq(airq, isc);
out:
	snprintf(dbf_txt, sizeof(dbf_txt), "rairq:%d", ret);
	CIO_TRACE_EVENT(4, dbf_txt);
	if (ret < 0) {
		kfree(airq);
		return ERR_PTR(ret);
	} else
		return &indicators[isc].byte[ret];
}