mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-01-23 16:53:58 -05:00
mfd: intel: Constify static struct resource
Constify a number of static struct resource. The only usage of the structs are to assign their address to the resources field in the mfd_cell struct. This allows the compiler to put them in read-only memory. Done with the help of Coccinelle. Signed-off-by: Rikard Falkeborn <rikard.falkeborn@gmail.com> Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com> Signed-off-by: Lee Jones <lee.jones@linaro.org>
This commit is contained in:
parent
a0fa0abeb5
commit
bf4cceb6e0
5 changed files with 28 additions and 28 deletions
|
@ -50,23 +50,23 @@ struct intel_msic {
|
|||
void __iomem *irq_base;
|
||||
};
|
||||
|
||||
static struct resource msic_touch_resources[] = {
|
||||
static const struct resource msic_touch_resources[] = {
|
||||
DEFINE_RES_IRQ(0),
|
||||
};
|
||||
|
||||
static struct resource msic_adc_resources[] = {
|
||||
static const struct resource msic_adc_resources[] = {
|
||||
DEFINE_RES_IRQ(0),
|
||||
};
|
||||
|
||||
static struct resource msic_battery_resources[] = {
|
||||
static const struct resource msic_battery_resources[] = {
|
||||
DEFINE_RES_IRQ(0),
|
||||
};
|
||||
|
||||
static struct resource msic_gpio_resources[] = {
|
||||
static const struct resource msic_gpio_resources[] = {
|
||||
DEFINE_RES_IRQ(0),
|
||||
};
|
||||
|
||||
static struct resource msic_audio_resources[] = {
|
||||
static const struct resource msic_audio_resources[] = {
|
||||
DEFINE_RES_IRQ_NAMED(0, "IRQ"),
|
||||
/*
|
||||
* We will pass IRQ_BASE to the driver now but this can be removed
|
||||
|
@ -75,19 +75,19 @@ static struct resource msic_audio_resources[] = {
|
|||
DEFINE_RES_MEM_NAMED(MSIC_IRQ_STATUS_ACCDET, 1, "IRQ_BASE"),
|
||||
};
|
||||
|
||||
static struct resource msic_hdmi_resources[] = {
|
||||
static const struct resource msic_hdmi_resources[] = {
|
||||
DEFINE_RES_IRQ(0),
|
||||
};
|
||||
|
||||
static struct resource msic_thermal_resources[] = {
|
||||
static const struct resource msic_thermal_resources[] = {
|
||||
DEFINE_RES_IRQ(0),
|
||||
};
|
||||
|
||||
static struct resource msic_power_btn_resources[] = {
|
||||
static const struct resource msic_power_btn_resources[] = {
|
||||
DEFINE_RES_IRQ(0),
|
||||
};
|
||||
|
||||
static struct resource msic_ocd_resources[] = {
|
||||
static const struct resource msic_ocd_resources[] = {
|
||||
DEFINE_RES_IRQ(0),
|
||||
};
|
||||
|
||||
|
|
|
@ -200,32 +200,32 @@ static struct regmap_irq_chip bxtwc_regmap_irq_chip_crit = {
|
|||
.num_regs = 1,
|
||||
};
|
||||
|
||||
static struct resource gpio_resources[] = {
|
||||
static const struct resource gpio_resources[] = {
|
||||
DEFINE_RES_IRQ_NAMED(BXTWC_GPIO_LVL1_IRQ, "GPIO"),
|
||||
};
|
||||
|
||||
static struct resource adc_resources[] = {
|
||||
static const struct resource adc_resources[] = {
|
||||
DEFINE_RES_IRQ_NAMED(BXTWC_ADC_IRQ, "ADC"),
|
||||
};
|
||||
|
||||
static struct resource usbc_resources[] = {
|
||||
static const struct resource usbc_resources[] = {
|
||||
DEFINE_RES_IRQ(BXTWC_USBC_IRQ),
|
||||
};
|
||||
|
||||
static struct resource charger_resources[] = {
|
||||
static const struct resource charger_resources[] = {
|
||||
DEFINE_RES_IRQ_NAMED(BXTWC_CHGR0_IRQ, "CHARGER"),
|
||||
DEFINE_RES_IRQ_NAMED(BXTWC_CHGR1_IRQ, "CHARGER1"),
|
||||
};
|
||||
|
||||
static struct resource thermal_resources[] = {
|
||||
static const struct resource thermal_resources[] = {
|
||||
DEFINE_RES_IRQ(BXTWC_THRM_LVL1_IRQ),
|
||||
};
|
||||
|
||||
static struct resource bcu_resources[] = {
|
||||
static const struct resource bcu_resources[] = {
|
||||
DEFINE_RES_IRQ_NAMED(BXTWC_BCU_IRQ, "BCU"),
|
||||
};
|
||||
|
||||
static struct resource tmu_resources[] = {
|
||||
static const struct resource tmu_resources[] = {
|
||||
DEFINE_RES_IRQ_NAMED(BXTWC_TMU_IRQ, "TMU"),
|
||||
};
|
||||
|
||||
|
|
|
@ -32,23 +32,23 @@ enum {
|
|||
CHTDC_TI_CCEOCAL = 7, /* battery */
|
||||
};
|
||||
|
||||
static struct resource power_button_resources[] = {
|
||||
static const struct resource power_button_resources[] = {
|
||||
DEFINE_RES_IRQ(CHTDC_TI_PWRBTN),
|
||||
};
|
||||
|
||||
static struct resource thermal_resources[] = {
|
||||
static const struct resource thermal_resources[] = {
|
||||
DEFINE_RES_IRQ(CHTDC_TI_DIETMPWARN),
|
||||
};
|
||||
|
||||
static struct resource adc_resources[] = {
|
||||
static const struct resource adc_resources[] = {
|
||||
DEFINE_RES_IRQ(CHTDC_TI_ADCCMPL),
|
||||
};
|
||||
|
||||
static struct resource pwrsrc_resources[] = {
|
||||
static const struct resource pwrsrc_resources[] = {
|
||||
DEFINE_RES_IRQ(CHTDC_TI_VBUSDET),
|
||||
};
|
||||
|
||||
static struct resource battery_resources[] = {
|
||||
static const struct resource battery_resources[] = {
|
||||
DEFINE_RES_IRQ(CHTDC_TI_VBATLOW),
|
||||
DEFINE_RES_IRQ(CHTDC_TI_CCEOCAL),
|
||||
};
|
||||
|
|
|
@ -41,11 +41,11 @@ enum {
|
|||
CHT_WC_CRIT_IRQ = 7,
|
||||
};
|
||||
|
||||
static struct resource cht_wc_pwrsrc_resources[] = {
|
||||
static const struct resource cht_wc_pwrsrc_resources[] = {
|
||||
DEFINE_RES_IRQ(CHT_WC_PWRSRC_IRQ),
|
||||
};
|
||||
|
||||
static struct resource cht_wc_ext_charger_resources[] = {
|
||||
static const struct resource cht_wc_ext_charger_resources[] = {
|
||||
DEFINE_RES_IRQ(CHT_WC_EXT_CHGR_IRQ),
|
||||
};
|
||||
|
||||
|
|
|
@ -28,23 +28,23 @@
|
|||
#define CRYSTAL_COVE_IRQ_GPIO 5
|
||||
#define CRYSTAL_COVE_IRQ_VHDMIOCP 6
|
||||
|
||||
static struct resource gpio_resources[] = {
|
||||
static const struct resource gpio_resources[] = {
|
||||
DEFINE_RES_IRQ_NAMED(CRYSTAL_COVE_IRQ_GPIO, "GPIO"),
|
||||
};
|
||||
|
||||
static struct resource pwrsrc_resources[] = {
|
||||
static const struct resource pwrsrc_resources[] = {
|
||||
DEFINE_RES_IRQ_NAMED(CRYSTAL_COVE_IRQ_PWRSRC, "PWRSRC"),
|
||||
};
|
||||
|
||||
static struct resource adc_resources[] = {
|
||||
static const struct resource adc_resources[] = {
|
||||
DEFINE_RES_IRQ_NAMED(CRYSTAL_COVE_IRQ_ADC, "ADC"),
|
||||
};
|
||||
|
||||
static struct resource thermal_resources[] = {
|
||||
static const struct resource thermal_resources[] = {
|
||||
DEFINE_RES_IRQ_NAMED(CRYSTAL_COVE_IRQ_THRM, "THERMAL"),
|
||||
};
|
||||
|
||||
static struct resource bcu_resources[] = {
|
||||
static const struct resource bcu_resources[] = {
|
||||
DEFINE_RES_IRQ_NAMED(CRYSTAL_COVE_IRQ_BCU, "BCU"),
|
||||
};
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue