mirror of
https://github.com/torvalds/linux.git
synced 2024-11-22 12:11:40 +00:00
mfd: Constify regmap and irq configuration data
Constify in various drivers configuration data which is not modified: - regmap_irq_chip, - individual regmap_irq's in array, - regmap_config, - irq_domain_ops, Signed-off-by: Krzysztof Kozlowski <k.kozlowski.k@gmail.com> Signed-off-by: Lee Jones <lee.jones@linaro.org>
This commit is contained in:
parent
79aa79342c
commit
7ce7b26f84
@ -566,7 +566,7 @@ static int pm860x_irq_domain_map(struct irq_domain *d, unsigned int virq,
|
||||
return 0;
|
||||
}
|
||||
|
||||
static struct irq_domain_ops pm860x_irq_domain_ops = {
|
||||
static const struct irq_domain_ops pm860x_irq_domain_ops = {
|
||||
.map = pm860x_irq_domain_map,
|
||||
.xlate = irq_domain_xlate_onetwocell,
|
||||
};
|
||||
|
@ -574,7 +574,7 @@ static int ab8500_irq_map(struct irq_domain *d, unsigned int virq,
|
||||
return 0;
|
||||
}
|
||||
|
||||
static struct irq_domain_ops ab8500_irq_ops = {
|
||||
static const struct irq_domain_ops ab8500_irq_ops = {
|
||||
.map = ab8500_irq_map,
|
||||
.xlate = irq_domain_xlate_twocell,
|
||||
};
|
||||
|
@ -186,7 +186,7 @@ static int arizona_irq_map(struct irq_domain *h, unsigned int virq,
|
||||
return 0;
|
||||
}
|
||||
|
||||
static struct irq_domain_ops arizona_domain_ops = {
|
||||
static const struct irq_domain_ops arizona_domain_ops = {
|
||||
.map = arizona_irq_map,
|
||||
.xlate = irq_domain_xlate_twocell,
|
||||
};
|
||||
|
@ -35,7 +35,7 @@
|
||||
#define DA9052_IRQ_MASK_POS_7 0x40
|
||||
#define DA9052_IRQ_MASK_POS_8 0x80
|
||||
|
||||
static struct regmap_irq da9052_irqs[] = {
|
||||
static const struct regmap_irq da9052_irqs[] = {
|
||||
[DA9052_IRQ_DCIN] = {
|
||||
.reg_offset = 0,
|
||||
.mask = DA9052_IRQ_MASK_POS_1,
|
||||
@ -166,7 +166,7 @@ static struct regmap_irq da9052_irqs[] = {
|
||||
},
|
||||
};
|
||||
|
||||
static struct regmap_irq_chip da9052_regmap_irq_chip = {
|
||||
static const struct regmap_irq_chip da9052_regmap_irq_chip = {
|
||||
.name = "da9052_irq",
|
||||
.status_base = DA9052_EVENT_A_REG,
|
||||
.mask_base = DA9052_IRQ_MASK_A_REG,
|
||||
|
@ -222,7 +222,7 @@ static bool da9055_register_volatile(struct device *dev, unsigned int reg)
|
||||
}
|
||||
}
|
||||
|
||||
static struct regmap_irq da9055_irqs[] = {
|
||||
static const struct regmap_irq da9055_irqs[] = {
|
||||
[DA9055_IRQ_NONKEY] = {
|
||||
.reg_offset = 0,
|
||||
.mask = DA9055_IRQ_NONKEY_MASK,
|
||||
@ -245,7 +245,7 @@ static struct regmap_irq da9055_irqs[] = {
|
||||
},
|
||||
};
|
||||
|
||||
struct regmap_config da9055_regmap_config = {
|
||||
const struct regmap_config da9055_regmap_config = {
|
||||
.reg_bits = 8,
|
||||
.val_bits = 8,
|
||||
|
||||
@ -367,7 +367,7 @@ static const struct mfd_cell da9055_devs[] = {
|
||||
},
|
||||
};
|
||||
|
||||
static struct regmap_irq_chip da9055_regmap_irq_chip = {
|
||||
static const struct regmap_irq_chip da9055_regmap_irq_chip = {
|
||||
.name = "da9055_irq",
|
||||
.status_base = DA9055_REG_EVENT_A,
|
||||
.mask_base = DA9055_REG_IRQ_MASK_A,
|
||||
|
@ -34,7 +34,7 @@ struct da9063_irq_data {
|
||||
u8 mask;
|
||||
};
|
||||
|
||||
static struct regmap_irq da9063_irqs[] = {
|
||||
static const struct regmap_irq da9063_irqs[] = {
|
||||
/* DA9063 event A register */
|
||||
[DA9063_IRQ_ONKEY] = {
|
||||
.reg_offset = DA9063_REG_EVENT_A_OFFSET,
|
||||
@ -153,7 +153,7 @@ static struct regmap_irq da9063_irqs[] = {
|
||||
},
|
||||
};
|
||||
|
||||
static struct regmap_irq_chip da9063_irq_chip = {
|
||||
static const struct regmap_irq_chip da9063_irq_chip = {
|
||||
.name = "da9063-irq",
|
||||
.irqs = da9063_irqs,
|
||||
.num_irqs = DA9063_NUM_IRQ,
|
||||
|
@ -164,7 +164,7 @@ void da9150_bulk_write(struct da9150 *da9150, u16 reg, int count, const u8 *buf)
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(da9150_bulk_write);
|
||||
|
||||
static struct regmap_irq da9150_irqs[] = {
|
||||
static const struct regmap_irq da9150_irqs[] = {
|
||||
[DA9150_IRQ_VBUS] = {
|
||||
.reg_offset = 0,
|
||||
.mask = DA9150_E_VBUS_MASK,
|
||||
@ -251,7 +251,7 @@ static struct regmap_irq da9150_irqs[] = {
|
||||
},
|
||||
};
|
||||
|
||||
static struct regmap_irq_chip da9150_regmap_irq_chip = {
|
||||
static const struct regmap_irq_chip da9150_regmap_irq_chip = {
|
||||
.name = "da9150_irq",
|
||||
.status_base = DA9150_EVENT_E,
|
||||
.mask_base = DA9150_IRQ_MASK_E,
|
||||
|
@ -2659,7 +2659,7 @@ static int db8500_irq_map(struct irq_domain *d, unsigned int virq,
|
||||
return 0;
|
||||
}
|
||||
|
||||
static struct irq_domain_ops db8500_irq_ops = {
|
||||
static const struct irq_domain_ops db8500_irq_ops = {
|
||||
.map = db8500_irq_map,
|
||||
.xlate = irq_domain_xlate_twocell,
|
||||
};
|
||||
|
@ -24,7 +24,7 @@ struct intel_soc_pmic_config {
|
||||
struct mfd_cell *cell_dev;
|
||||
int n_cell_devs;
|
||||
const struct regmap_config *regmap_config;
|
||||
struct regmap_irq_chip *irq_chip;
|
||||
const struct regmap_irq_chip *irq_chip;
|
||||
};
|
||||
|
||||
extern struct intel_soc_pmic_config intel_soc_pmic_config_crc;
|
||||
|
@ -143,7 +143,7 @@ static const struct regmap_irq crystal_cove_irqs[] = {
|
||||
},
|
||||
};
|
||||
|
||||
static struct regmap_irq_chip crystal_cove_irq_chip = {
|
||||
static const struct regmap_irq_chip crystal_cove_irq_chip = {
|
||||
.name = "Crystal Cove",
|
||||
.irqs = crystal_cove_irqs,
|
||||
.num_irqs = ARRAY_SIZE(crystal_cove_irqs),
|
||||
|
@ -151,7 +151,7 @@ static int lp8788_irq_map(struct irq_domain *d, unsigned int virq,
|
||||
return 0;
|
||||
}
|
||||
|
||||
static struct irq_domain_ops lp8788_domain_ops = {
|
||||
static const struct irq_domain_ops lp8788_domain_ops = {
|
||||
.map = lp8788_irq_map,
|
||||
};
|
||||
|
||||
|
@ -658,7 +658,7 @@ static int max8925_irq_domain_map(struct irq_domain *d, unsigned int virq,
|
||||
return 0;
|
||||
}
|
||||
|
||||
static struct irq_domain_ops max8925_irq_domain_ops = {
|
||||
static const struct irq_domain_ops max8925_irq_domain_ops = {
|
||||
.map = max8925_irq_domain_map,
|
||||
.xlate = irq_domain_xlate_onetwocell,
|
||||
};
|
||||
|
@ -303,7 +303,7 @@ static int max8997_irq_domain_map(struct irq_domain *d, unsigned int irq,
|
||||
return 0;
|
||||
}
|
||||
|
||||
static struct irq_domain_ops max8997_irq_domain_ops = {
|
||||
static const struct irq_domain_ops max8997_irq_domain_ops = {
|
||||
.map = max8997_irq_domain_map,
|
||||
};
|
||||
|
||||
|
@ -214,7 +214,7 @@ static int max8998_irq_domain_map(struct irq_domain *d, unsigned int irq,
|
||||
return 0;
|
||||
}
|
||||
|
||||
static struct irq_domain_ops max8998_irq_domain_ops = {
|
||||
static const struct irq_domain_ops max8998_irq_domain_ops = {
|
||||
.map = max8998_irq_domain_map,
|
||||
};
|
||||
|
||||
|
@ -130,7 +130,7 @@ static int mt6397_irq_domain_map(struct irq_domain *d, unsigned int irq,
|
||||
return 0;
|
||||
}
|
||||
|
||||
static struct irq_domain_ops mt6397_irq_domain_ops = {
|
||||
static const struct irq_domain_ops mt6397_irq_domain_ops = {
|
||||
.map = mt6397_irq_domain_map,
|
||||
};
|
||||
|
||||
|
@ -989,7 +989,7 @@ static void stmpe_irq_unmap(struct irq_domain *d, unsigned int virq)
|
||||
irq_set_chip_data(virq, NULL);
|
||||
}
|
||||
|
||||
static struct irq_domain_ops stmpe_irq_ops = {
|
||||
static const struct irq_domain_ops stmpe_irq_ops = {
|
||||
.map = stmpe_irq_map,
|
||||
.unmap = stmpe_irq_unmap,
|
||||
.xlate = irq_domain_xlate_twocell,
|
||||
|
@ -233,7 +233,7 @@ static void tc3589x_irq_unmap(struct irq_domain *d, unsigned int virq)
|
||||
irq_set_chip_data(virq, NULL);
|
||||
}
|
||||
|
||||
static struct irq_domain_ops tc3589x_irq_ops = {
|
||||
static const struct irq_domain_ops tc3589x_irq_ops = {
|
||||
.map = tc3589x_irq_map,
|
||||
.unmap = tc3589x_irq_unmap,
|
||||
.xlate = irq_domain_xlate_onecell,
|
||||
|
@ -311,7 +311,7 @@ static int tps6586x_irq_map(struct irq_domain *h, unsigned int virq,
|
||||
return 0;
|
||||
}
|
||||
|
||||
static struct irq_domain_ops tps6586x_domain_ops = {
|
||||
static const struct irq_domain_ops tps6586x_domain_ops = {
|
||||
.map = tps6586x_irq_map,
|
||||
.xlate = irq_domain_xlate_twocell,
|
||||
};
|
||||
|
@ -376,7 +376,7 @@ static void twl6030_irq_unmap(struct irq_domain *d, unsigned int virq)
|
||||
irq_set_chip_data(virq, NULL);
|
||||
}
|
||||
|
||||
static struct irq_domain_ops twl6030_irq_domain_ops = {
|
||||
static const struct irq_domain_ops twl6030_irq_domain_ops = {
|
||||
.map = twl6030_irq_map,
|
||||
.unmap = twl6030_irq_unmap,
|
||||
.xlate = irq_domain_xlate_onetwocell,
|
||||
|
@ -564,7 +564,7 @@ static int wm831x_irq_map(struct irq_domain *h, unsigned int virq,
|
||||
return 0;
|
||||
}
|
||||
|
||||
static struct irq_domain_ops wm831x_irq_domain_ops = {
|
||||
static const struct irq_domain_ops wm831x_irq_domain_ops = {
|
||||
.map = wm831x_irq_map,
|
||||
.xlate = irq_domain_xlate_twocell,
|
||||
};
|
||||
|
@ -28,7 +28,7 @@
|
||||
|
||||
#include <linux/delay.h>
|
||||
|
||||
static struct regmap_irq wm8994_irqs[] = {
|
||||
static const struct regmap_irq wm8994_irqs[] = {
|
||||
[WM8994_IRQ_TEMP_SHUT] = {
|
||||
.reg_offset = 1,
|
||||
.mask = WM8994_TEMP_SHUT_EINT,
|
||||
@ -128,7 +128,7 @@ static struct regmap_irq wm8994_irqs[] = {
|
||||
},
|
||||
};
|
||||
|
||||
static struct regmap_irq_chip wm8994_irq_chip = {
|
||||
static const struct regmap_irq_chip wm8994_irq_chip = {
|
||||
.name = "wm8994",
|
||||
.irqs = wm8994_irqs,
|
||||
.num_irqs = ARRAY_SIZE(wm8994_irqs),
|
||||
@ -184,7 +184,7 @@ static int wm8994_edge_irq_map(struct irq_domain *h, unsigned int virq,
|
||||
return 0;
|
||||
}
|
||||
|
||||
static struct irq_domain_ops wm8994_edge_irq_ops = {
|
||||
static const struct irq_domain_ops wm8994_edge_irq_ops = {
|
||||
.map = wm8994_edge_irq_map,
|
||||
.xlate = irq_domain_xlate_twocell,
|
||||
};
|
||||
|
@ -89,6 +89,6 @@ static inline int da9055_reg_update(struct da9055 *da9055, unsigned char reg,
|
||||
int da9055_device_init(struct da9055 *da9055);
|
||||
void da9055_device_exit(struct da9055 *da9055);
|
||||
|
||||
extern struct regmap_config da9055_regmap_config;
|
||||
extern const struct regmap_config da9055_regmap_config;
|
||||
|
||||
#endif /* __DA9055_CORE_H */
|
||||
|
Loading…
Reference in New Issue
Block a user