mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-11-24 09:40:58 +07:00
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>
This commit is contained in:
parent
0d674d93a0
commit
e5ad234485
@ -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;
|
||||
}
|
||||
|
@ -98,9 +98,8 @@ static struct max8998_irq_data max8998_irqs[] = {
|
||||
};
|
||||
|
||||
static inline struct max8998_irq_data *
|
||||
irq_to_max8998_irq(struct max8998_dev *max8998, int irq)
|
||||
irq_to_max8998_irq(struct max8998_dev *max8998, struct irq_data *data)
|
||||
{
|
||||
struct irq_data *data = irq_get_irq_data(irq);
|
||||
return &max8998_irqs[data->hwirq];
|
||||
}
|
||||
|
||||
@ -134,8 +133,7 @@ static void max8998_irq_sync_unlock(struct irq_data *data)
|
||||
static void max8998_irq_unmask(struct irq_data *data)
|
||||
{
|
||||
struct max8998_dev *max8998 = irq_data_get_irq_chip_data(data);
|
||||
struct max8998_irq_data *irq_data = irq_to_max8998_irq(max8998,
|
||||
data->irq);
|
||||
struct max8998_irq_data *irq_data = irq_to_max8998_irq(max8998, data);
|
||||
|
||||
max8998->irq_masks_cur[irq_data->reg - 1] &= ~irq_data->mask;
|
||||
}
|
||||
@ -143,8 +141,7 @@ static void max8998_irq_unmask(struct irq_data *data)
|
||||
static void max8998_irq_mask(struct irq_data *data)
|
||||
{
|
||||
struct max8998_dev *max8998 = irq_data_get_irq_chip_data(data);
|
||||
struct max8998_irq_data *irq_data = irq_to_max8998_irq(max8998,
|
||||
data->irq);
|
||||
struct max8998_irq_data *irq_data = irq_to_max8998_irq(max8998, data);
|
||||
|
||||
max8998->irq_masks_cur[irq_data->reg - 1] |= irq_data->mask;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user