提交 80633f05 编写于 作者: L Lee Jones 提交者: Samuel Ortiz

mfd: ab8500: Make ab8500_irq_get_virq() static

MFD core now takes care of  HWIRQ <-> VIRQ mapping, so the helper
ab8500_irq_get_virq() is no longer used by ab8500 subordinate devices
to obtain a Linux wide Virtual IRQ. The AB8500 IRQ controller still
uses it internally though, so we'll just hide it from the rest of the
world by making it static instead.
Signed-off-by: NLee Jones <lee.jones@linaro.org>
Reviewed-by: NLinus Walleij <linus.walleij@linaro.org>
Signed-off-by: NSamuel Ortiz <sameo@linux.intel.com>
上级 4f600ada
...@@ -472,6 +472,22 @@ static irqreturn_t ab8500_hierarchical_irq(int irq, void *dev) ...@@ -472,6 +472,22 @@ static irqreturn_t ab8500_hierarchical_irq(int irq, void *dev)
return IRQ_HANDLED; return IRQ_HANDLED;
} }
/**
* ab8500_irq_get_virq(): Map an interrupt on a chip to a virtual IRQ
*
* @ab8500: ab8500_irq controller to operate on.
* @irq: index of the interrupt requested in the chip IRQs
*
* Useful for drivers to request their own IRQs.
*/
static int ab8500_irq_get_virq(struct ab8500 *ab8500, int irq)
{
if (!ab8500)
return -EINVAL;
return irq_create_mapping(ab8500->domain, irq);
}
static irqreturn_t ab8500_irq(int irq, void *dev) static irqreturn_t ab8500_irq(int irq, void *dev)
{ {
struct ab8500 *ab8500 = dev; struct ab8500 *ab8500 = dev;
...@@ -511,23 +527,6 @@ static irqreturn_t ab8500_irq(int irq, void *dev) ...@@ -511,23 +527,6 @@ static irqreturn_t ab8500_irq(int irq, void *dev)
return IRQ_HANDLED; return IRQ_HANDLED;
} }
/**
* ab8500_irq_get_virq(): Map an interrupt on a chip to a virtual IRQ
*
* @ab8500: ab8500_irq controller to operate on.
* @irq: index of the interrupt requested in the chip IRQs
*
* Useful for drivers to request their own IRQs.
*/
int ab8500_irq_get_virq(struct ab8500 *ab8500, int irq)
{
if (!ab8500)
return -EINVAL;
return irq_create_mapping(ab8500->domain, irq);
}
EXPORT_SYMBOL_GPL(ab8500_irq_get_virq);
static int ab8500_irq_map(struct irq_domain *d, unsigned int virq, static int ab8500_irq_map(struct irq_domain *d, unsigned int virq,
irq_hw_number_t hwirq) irq_hw_number_t hwirq)
{ {
......
...@@ -341,6 +341,4 @@ static inline int is_ab8500_2p0(struct ab8500 *ab) ...@@ -341,6 +341,4 @@ static inline int is_ab8500_2p0(struct ab8500 *ab)
return (is_ab8500(ab) && (ab->chip_id == AB8500_CUT2P0)); return (is_ab8500(ab) && (ab->chip_id == AB8500_CUT2P0));
} }
int ab8500_irq_get_virq(struct ab8500 *ab8500, int irq);
#endif /* MFD_AB8500_H */ #endif /* MFD_AB8500_H */
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册