/* Set the hardware irq controller data for an irq  */
int set_irq_data(unsigned int irq, void *data)
/* Set the hardware irq controller data for an irq  */
int set_irq_data(unsigned int irq, void *data)
{
	struct irq_desc *desc = irq_to_desc(irq);
	unsigned long flags;
	if (!desc) {
		printk(KERN_ERR
		       "Trying to install controller data for IRQ%d\n", irq);
		return -EINVAL;
	}
	raw_spin_lock_irqsave(&desc->lock, flags);
	desc->handler_data = data;
	raw_spin_unlock_irqrestore(&desc->lock, flags);
	return 0;
}