Skip to contentSkip to conversation

mfd: max77620: Constify resources tables

PATCH Applied Axel Lin 2 participants 2 messages Jun 5, 2016 – Jun 8, 2016 Multifunction devices (MFD)

lore
Share & tools
lore

Axel Lin

author
#0 lore raw

PATCH 1/1 mfd: max77620: Constify resources tables

These tables are never modified, so declare them as const.

---
 drivers/mfd/max77620.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
drivers/mfd/max77620.c +4 -4
index 199d261..e831422 100644
@@ -37,19 +37,19 @@
 #include <linux/regmap.h>
 #include <linux/slab.h>
 
-static struct resource gpio_resources[] = {
+static const struct resource gpio_resources[] = {
 	DEFINE_RES_IRQ(MAX77620_IRQ_TOP_GPIO),
 };
 
-static struct resource power_resources[] = {
+static const struct resource power_resources[] = {
 	DEFINE_RES_IRQ(MAX77620_IRQ_LBT_MBATLOW),
 };
 
-static struct resource rtc_resources[] = {
+static const struct resource rtc_resources[] = {
 	DEFINE_RES_IRQ(MAX77620_IRQ_TOP_RTC),
 };
 
-static struct resource thermal_resources[] = {
+static const struct resource thermal_resources[] = {
 	DEFINE_RES_IRQ(MAX77620_IRQ_LBT_TJALRM1),
 	DEFINE_RES_IRQ(MAX77620_IRQ_LBT_TJALRM2),
 };
Signature · 1 line
2.5.0
Applied
#1 lore raw
Quoted 6 lines · Axel Lin

These tables are never modified, so declare them as const.

---
 drivers/mfd/max77620.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

Applied, thanks.

Quoted 28 lines
drivers/mfd/max77620.c +4 -4
index 199d261..e831422 100644
@@ -37,19 +37,19 @@
 #include <linux/regmap.h>
 #include <linux/slab.h>
 
-static struct resource gpio_resources[] = {
+static const struct resource gpio_resources[] = {
 	DEFINE_RES_IRQ(MAX77620_IRQ_TOP_GPIO),
 };
 
-static struct resource power_resources[] = {
+static const struct resource power_resources[] = {
 	DEFINE_RES_IRQ(MAX77620_IRQ_LBT_MBATLOW),
 };
 
-static struct resource rtc_resources[] = {
+static const struct resource rtc_resources[] = {
 	DEFINE_RES_IRQ(MAX77620_IRQ_TOP_RTC),
 };
 
-static struct resource thermal_resources[] = {
+static const struct resource thermal_resources[] = {
 	DEFINE_RES_IRQ(MAX77620_IRQ_LBT_TJALRM1),
 	DEFINE_RES_IRQ(MAX77620_IRQ_LBT_TJALRM2),
 };
Signature · 4 lines
Lee Jones
Linaro STMicroelectronics Landing Team Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog