提交 1e84aa44 编写于 作者: J Jiang Liu 提交者: Lee Jones

mfd: Use irq_desc_get_xxx() to avoid redundant lookup of irq_desc

Use irq_desc_get_xxx() to avoid redundant lookup of irq_desc while we
already have a pointer to corresponding irq_desc.

Do the same change to avoid the pattern "irq_get_chip_data(data->irq)".
Signed-off-by: NJiang Liu <jiang.liu@linux.intel.com>
Signed-off-by: NThomas Gleixner <tglx@linutronix.de>
Signed-off-by: NLee Jones <lee.jones@linaro.org>
上级 079140f5
...@@ -207,7 +207,7 @@ static void pcap_isr_work(struct work_struct *work) ...@@ -207,7 +207,7 @@ static void pcap_isr_work(struct work_struct *work)
static void pcap_irq_handler(unsigned int irq, struct irq_desc *desc) static void pcap_irq_handler(unsigned int irq, struct irq_desc *desc)
{ {
struct pcap_chip *pcap = irq_get_handler_data(irq); struct pcap_chip *pcap = irq_desc_get_handler_data(desc);
desc->irq_data.chip->irq_ack(&desc->irq_data); desc->irq_data.chip->irq_ack(&desc->irq_data);
queue_work(pcap->workqueue, &pcap->isr_work); queue_work(pcap->workqueue, &pcap->isr_work);
......
...@@ -113,14 +113,14 @@ static const struct max8997_irq_data max8997_irqs[] = { ...@@ -113,14 +113,14 @@ static const struct max8997_irq_data max8997_irqs[] = {
static void max8997_irq_lock(struct irq_data *data) static void max8997_irq_lock(struct irq_data *data)
{ {
struct max8997_dev *max8997 = irq_get_chip_data(data->irq); struct max8997_dev *max8997 = irq_data_get_irq_chip_data(data);
mutex_lock(&max8997->irqlock); mutex_lock(&max8997->irqlock);
} }
static void max8997_irq_sync_unlock(struct irq_data *data) static void max8997_irq_sync_unlock(struct irq_data *data)
{ {
struct max8997_dev *max8997 = irq_get_chip_data(data->irq); struct max8997_dev *max8997 = irq_data_get_irq_chip_data(data);
int i; int i;
for (i = 0; i < MAX8997_IRQ_GROUP_NR; i++) { for (i = 0; i < MAX8997_IRQ_GROUP_NR; i++) {
...@@ -148,7 +148,7 @@ irq_to_max8997_irq(struct max8997_dev *max8997, int irq) ...@@ -148,7 +148,7 @@ irq_to_max8997_irq(struct max8997_dev *max8997, int irq)
static void max8997_irq_mask(struct irq_data *data) static void max8997_irq_mask(struct irq_data *data)
{ {
struct max8997_dev *max8997 = irq_get_chip_data(data->irq); struct max8997_dev *max8997 = irq_data_get_irq_chip_data(data);
const struct max8997_irq_data *irq_data = irq_to_max8997_irq(max8997, const struct max8997_irq_data *irq_data = irq_to_max8997_irq(max8997,
data->irq); data->irq);
...@@ -157,7 +157,7 @@ static void max8997_irq_mask(struct irq_data *data) ...@@ -157,7 +157,7 @@ static void max8997_irq_mask(struct irq_data *data)
static void max8997_irq_unmask(struct irq_data *data) static void max8997_irq_unmask(struct irq_data *data)
{ {
struct max8997_dev *max8997 = irq_get_chip_data(data->irq); struct max8997_dev *max8997 = irq_data_get_irq_chip_data(data);
const struct max8997_irq_data *irq_data = irq_to_max8997_irq(max8997, const struct max8997_irq_data *irq_data = irq_to_max8997_irq(max8997,
data->irq); data->irq);
......
...@@ -60,14 +60,14 @@ static const struct mfd_cell mt6397_devs[] = { ...@@ -60,14 +60,14 @@ static const struct mfd_cell mt6397_devs[] = {
static void mt6397_irq_lock(struct irq_data *data) static void mt6397_irq_lock(struct irq_data *data)
{ {
struct mt6397_chip *mt6397 = irq_get_chip_data(data->irq); struct mt6397_chip *mt6397 = irq_data_get_irq_chip_data(data);
mutex_lock(&mt6397->irqlock); mutex_lock(&mt6397->irqlock);
} }
static void mt6397_irq_sync_unlock(struct irq_data *data) static void mt6397_irq_sync_unlock(struct irq_data *data)
{ {
struct mt6397_chip *mt6397 = irq_get_chip_data(data->irq); struct mt6397_chip *mt6397 = irq_data_get_irq_chip_data(data);
regmap_write(mt6397->regmap, MT6397_INT_CON0, mt6397->irq_masks_cur[0]); regmap_write(mt6397->regmap, MT6397_INT_CON0, mt6397->irq_masks_cur[0]);
regmap_write(mt6397->regmap, MT6397_INT_CON1, mt6397->irq_masks_cur[1]); regmap_write(mt6397->regmap, MT6397_INT_CON1, mt6397->irq_masks_cur[1]);
...@@ -77,7 +77,7 @@ static void mt6397_irq_sync_unlock(struct irq_data *data) ...@@ -77,7 +77,7 @@ static void mt6397_irq_sync_unlock(struct irq_data *data)
static void mt6397_irq_disable(struct irq_data *data) static void mt6397_irq_disable(struct irq_data *data)
{ {
struct mt6397_chip *mt6397 = irq_get_chip_data(data->irq); struct mt6397_chip *mt6397 = irq_data_get_irq_chip_data(data);
int shift = data->hwirq & 0xf; int shift = data->hwirq & 0xf;
int reg = data->hwirq >> 4; int reg = data->hwirq >> 4;
...@@ -86,7 +86,7 @@ static void mt6397_irq_disable(struct irq_data *data) ...@@ -86,7 +86,7 @@ static void mt6397_irq_disable(struct irq_data *data)
static void mt6397_irq_enable(struct irq_data *data) static void mt6397_irq_enable(struct irq_data *data)
{ {
struct mt6397_chip *mt6397 = irq_get_chip_data(data->irq); struct mt6397_chip *mt6397 = irq_data_get_irq_chip_data(data);
int shift = data->hwirq & 0xf; int shift = data->hwirq & 0xf;
int reg = data->hwirq >> 4; int reg = data->hwirq >> 4;
......
...@@ -187,7 +187,7 @@ static struct mfd_cell t7l66xb_cells[] = { ...@@ -187,7 +187,7 @@ static struct mfd_cell t7l66xb_cells[] = {
/* Handle the T7L66XB interrupt mux */ /* Handle the T7L66XB interrupt mux */
static void t7l66xb_irq(unsigned int irq, struct irq_desc *desc) static void t7l66xb_irq(unsigned int irq, struct irq_desc *desc)
{ {
struct t7l66xb *t7l66xb = irq_get_handler_data(irq); struct t7l66xb *t7l66xb = irq_desc_get_handler_data(desc);
unsigned int isr; unsigned int isr;
unsigned int i, irq_base; unsigned int i, irq_base;
......
...@@ -525,7 +525,7 @@ static int tc6393xb_register_gpio(struct tc6393xb *tc6393xb, int gpio_base) ...@@ -525,7 +525,7 @@ static int tc6393xb_register_gpio(struct tc6393xb *tc6393xb, int gpio_base)
static void static void
tc6393xb_irq(unsigned int irq, struct irq_desc *desc) tc6393xb_irq(unsigned int irq, struct irq_desc *desc)
{ {
struct tc6393xb *tc6393xb = irq_get_handler_data(irq); struct tc6393xb *tc6393xb = irq_desc_get_handler_data(desc);
unsigned int isr; unsigned int isr;
unsigned int i, irq_base; unsigned int i, irq_base;
......
...@@ -231,7 +231,7 @@ static irqreturn_t twl6030_irq_thread(int irq, void *data) ...@@ -231,7 +231,7 @@ static irqreturn_t twl6030_irq_thread(int irq, void *data)
static int twl6030_irq_set_wake(struct irq_data *d, unsigned int on) static int twl6030_irq_set_wake(struct irq_data *d, unsigned int on)
{ {
struct twl6030_irq *pdata = irq_get_chip_data(d->irq); struct twl6030_irq *pdata = irq_data_get_irq_chip_data(d);
if (on) if (on)
atomic_inc(&pdata->wakeirqs); atomic_inc(&pdata->wakeirqs);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册