/* mpc52xx_gpt_from_irq - Return the GPT device associated with an IRQ number @irq: irq of timer.  */
struct mpc52xx_gpt_priv* mpc52xx_gpt_from_irq(int irq)
/* mpc52xx_gpt_from_irq - Return the GPT device associated with an IRQ number @irq: irq of timer.  */
struct mpc52xx_gpt_priv* mpc52xx_gpt_from_irq(int irq)
{
	struct mpc52xx_gpt_priv *gpt;
	struct list_head *pos;
	mutex_lock(&mpc52xx_gpt_list_mutex);
	list_for_each(pos, &mpc52xx_gpt_list) {
		gpt = container_of(pos, struct mpc52xx_gpt_priv, list);
		if (gpt->irqhost && irq == irq_linear_revmap(gpt->irqhost, 0)) {
			mutex_unlock(&mpc52xx_gpt_list_mutex);
			return gpt;
		}
	}
	mutex_unlock(&mpc52xx_gpt_list_mutex);
	return NULL;
}