aboutsummaryrefslogtreecommitdiff
path: root/drivers/mfd/max8997-irq.c
diff options
context:
space:
mode:
authorThomas Gleixner2015-07-13 20:44:59 +0000
committerLee Jones2015-08-11 15:09:08 +0100
commite5ad234485ee868c09f2d59b2ed94d6c6e6d3f19 (patch)
tree6513ea1463223704363010649b0d92c7b5297cba /drivers/mfd/max8997-irq.c
parent0d674d93a08f0073a9eb290bbac56fdedc4f319d (diff)
mfd: max899x: Avoid redundant irq_data lookup
It's pretty silly to do irq_data *d = irq_get_irq_data(irq_data->irq); because that results in d = irq_data, but goes through a lookup of the irq_data. Use irq_data directly. Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Signed-off-by: Lee Jones <lee.jones@linaro.org>
Diffstat (limited to 'drivers/mfd/max8997-irq.c')
-rw-r--r--drivers/mfd/max8997-irq.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/drivers/mfd/max8997-irq.c b/drivers/mfd/max8997-irq.c
index 03508484b56a..b95a46d79b9d 100644
--- a/drivers/mfd/max8997-irq.c
+++ b/drivers/mfd/max8997-irq.c
@@ -140,9 +140,8 @@ static void max8997_irq_sync_unlock(struct irq_data *data)
}
static const inline struct max8997_irq_data *
-irq_to_max8997_irq(struct max8997_dev *max8997, int irq)
+irq_to_max8997_irq(struct max8997_dev *max8997, struct irq_data *data)
{
- struct irq_data *data = irq_get_irq_data(irq);
return &max8997_irqs[data->hwirq];
}
@@ -150,7 +149,7 @@ static void max8997_irq_mask(struct irq_data *data)
{
struct max8997_dev *max8997 = irq_data_get_irq_chip_data(data);
const struct max8997_irq_data *irq_data = irq_to_max8997_irq(max8997,
- data->irq);
+ data);
max8997->irq_masks_cur[irq_data->group] |= irq_data->mask;
}
@@ -159,7 +158,7 @@ static void max8997_irq_unmask(struct irq_data *data)
{
struct max8997_dev *max8997 = irq_data_get_irq_chip_data(data);
const struct max8997_irq_data *irq_data = irq_to_max8997_irq(max8997,
- data->irq);
+ data);
max8997->irq_masks_cur[irq_data->group] &= ~irq_data->mask;
}