/* @priv: IRQ router driver's priv data @linkno: PIRQ link number (0 for PIRQA, 1 for PIRQB, etc)  */
static int pirq_linkno_to_reg(struct irq_router *priv, int linkno)
/* @priv: IRQ router driver's priv data @linkno: PIRQ link number (0 for PIRQA, 1 for PIRQB, etc)  */
static int pirq_linkno_to_reg(struct irq_router *priv, int linkno)
{
	int reg = 0;
	if (priv->has_regmap) {
		struct pirq_regmap *map = priv->regmap;
		int i;
		for (i = 0; i < priv->link_num; i++) {
			if (linkno == map->link) {
				reg = map->offset + priv->link_base;
				break;
			}
			map++;
		}
	} else {
		reg = linkno + priv->link_base;
	}
	return reg;
}