pinctrl: sh-pfc: ARM: Constify pins and cfg_regs arrays
authorLaurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Mon, 16 Dec 2013 19:25:17 +0000 (20:25 +0100)
committerLinus Walleij <linus.walleij@linaro.org>
Fri, 20 Dec 2013 11:28:40 +0000 (12:28 +0100)
The arrays are never modified, declare them as const.

Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
drivers/pinctrl/sh-pfc/pfc-r8a73a4.c
drivers/pinctrl/sh-pfc/pfc-r8a7740.c
drivers/pinctrl/sh-pfc/pfc-r8a7778.c
drivers/pinctrl/sh-pfc/pfc-r8a7779.c
drivers/pinctrl/sh-pfc/pfc-r8a7790.c
drivers/pinctrl/sh-pfc/pfc-r8a7791.c
drivers/pinctrl/sh-pfc/pfc-sh7372.c
drivers/pinctrl/sh-pfc/pfc-sh73a0.c

index 32dd478f28e3a07257352fcfed73bec7c6ff9fb2..d39ca87353e4cf723dc5f5626dba93fa6aa6467e 100644 (file)
@@ -1272,7 +1272,7 @@ static const u16 pinmux_data[] = {
 #define R8A73A4_PIN_IO_PU_PD(pin)       SH_PFC_PIN_CFG(pin, __IO | __PUD)
 #define R8A73A4_PIN_O(pin)              SH_PFC_PIN_CFG(pin, __O)
 
-static struct sh_pfc_pin pinmux_pins[] = {
+static const struct sh_pfc_pin pinmux_pins[] = {
        R8A73A4_PIN_IO_PU_PD(0), R8A73A4_PIN_IO_PU_PD(1),
        R8A73A4_PIN_IO_PU_PD(2), R8A73A4_PIN_IO_PU_PD(3),
        R8A73A4_PIN_IO_PU_PD(4), R8A73A4_PIN_IO_PU_PD(5),
index a189b962a1eba6181f4392422182c2272e87430a..f4d30246460f0f4bf83c2cdca3efcb13bc8d55f9 100644 (file)
@@ -1543,7 +1543,7 @@ static const u16 pinmux_data[] = {
 #define R8A7740_PIN_O(pin)             SH_PFC_PIN_CFG(pin, __O)
 #define R8A7740_PIN_O_PU_PD(pin)       SH_PFC_PIN_CFG(pin, __O | __PUD)
 
-static struct sh_pfc_pin pinmux_pins[] = {
+static const struct sh_pfc_pin pinmux_pins[] = {
        /* Table 56-1 (I/O and Pull U/D) */
        R8A7740_PIN_IO_PD(0),           R8A7740_PIN_IO_PD(1),
        R8A7740_PIN_IO_PD(2),           R8A7740_PIN_IO_PD(3),
index 8b1881c205980fc71aaecad645801894639102c3..c7d610d1f3efb8054a3358a2f6c087795d5705f7 100644 (file)
@@ -1260,7 +1260,7 @@ static const u16 pinmux_data[] = {
  */
 #define PIN_NUMBER(row, col)           (1000+((row)-1)*25+(col)-1)
 
-static struct sh_pfc_pin pinmux_pins[] = {
+static const struct sh_pfc_pin pinmux_pins[] = {
        PINMUX_GPIO_GP_ALL(),
 
        /* Pins not associated with a GPIO port */
@@ -2104,7 +2104,7 @@ static const struct sh_pfc_function pinmux_functions[] = {
        SH_PFC_FUNCTION(vin1),
 };
 
-static struct pinmux_cfg_reg pinmux_config_regs[] = {
+static const struct pinmux_cfg_reg pinmux_config_regs[] = {
        { PINMUX_CFG_REG("GPSR0", 0xfffc0004, 32, 1) {
                GP_0_31_FN,     FN_IP1_14_11,
                GP_0_30_FN,     FN_IP1_10_8,
index d3e94e307d7f175a72980c79c08ca13e559fbe0f..f5c01e1e2615f3af907d1a9b2ef64d2ccd72acd7 100644 (file)
@@ -1410,7 +1410,7 @@ static const u16 pinmux_data[] = {
        PINMUX_IPSR_MODSEL_DATA(IP12_17_15, SCK4_B, SEL_SCIF4_1),
 };
 
-static struct sh_pfc_pin pinmux_pins[] = {
+static const struct sh_pfc_pin pinmux_pins[] = {
        PINMUX_GPIO_GP_ALL(),
 };
 
index 293a51a7434e47e7ab5c6649ef6b10c22f90352c..a8ba2575a4537e5ddca378fea2744596b4923e6e 100644 (file)
@@ -1731,7 +1731,7 @@ static const u16 pinmux_data[] = {
 #define PIN_NUMBER(r, c) (((r) - 'A') * 31 + (c) + 200)
 #define PIN_A_NUMBER(r, c) PIN_NUMBER(ROW_GROUP_A(r), c)
 
-static struct sh_pfc_pin pinmux_pins[] = {
+static const struct sh_pfc_pin pinmux_pins[] = {
        PINMUX_GPIO_GP_ALL(),
 
        /* Pins not associated with a GPIO port */
@@ -4237,7 +4237,7 @@ static const struct sh_pfc_function pinmux_functions[] = {
        SH_PFC_FUNCTION(vin3),
 };
 
-static struct pinmux_cfg_reg pinmux_config_regs[] = {
+static const struct pinmux_cfg_reg pinmux_config_regs[] = {
        { PINMUX_CFG_REG("GPSR0", 0xE6060004, 32, 1) {
                GP_0_31_FN, FN_IP3_17_15,
                GP_0_30_FN, FN_IP3_14_12,
index ea02d37bab7cdfa7d0ae07477a8a2bbd3ff1b03b..d73a5f312777f939ef134ed8bf65f3636c3eb8a9 100644 (file)
@@ -1674,7 +1674,7 @@ static const u16 pinmux_data[] = {
        PINMUX_IPSR_MODSEL_DATA(IP16_11_10, CAN1_RX_B, SEL_CAN1_1),
 };
 
-static struct sh_pfc_pin pinmux_pins[] = {
+static const struct sh_pfc_pin pinmux_pins[] = {
        PINMUX_GPIO_GP_ALL(),
 };
 
@@ -3056,7 +3056,7 @@ static const struct sh_pfc_function pinmux_functions[] = {
        SH_PFC_FUNCTION(usb1),
 };
 
-static struct pinmux_cfg_reg pinmux_config_regs[] = {
+static const struct pinmux_cfg_reg pinmux_config_regs[] = {
        { PINMUX_CFG_REG("GPSR0", 0xE6060004, 32, 1) {
                GP_0_31_FN, FN_IP1_22_20,
                GP_0_30_FN, FN_IP1_19_17,
index bcdd5c3cdcf08ed3500af15f0b5002f12f2d079a..e9c522bfb3df16da8eb0dda865a4e465c7bba661 100644 (file)
@@ -844,7 +844,7 @@ static const u16 pinmux_data[] = {
 #define SH7372_PIN_O(pin)              SH_PFC_PIN_CFG(pin, __O)
 #define SH7372_PIN_O_PU_PD(pin)                SH_PFC_PIN_CFG(pin, __O | __PUD)
 
-static struct sh_pfc_pin pinmux_pins[] = {
+static const struct sh_pfc_pin pinmux_pins[] = {
        /* Table 57-1 (I/O and Pull U/D) */
        SH7372_PIN_IO_PD(0),            SH7372_PIN_IO_PD(1),
        SH7372_PIN_O(2),                SH7372_PIN_I_PD(3),
index dc7c7fb3380594cf3b6f90768343064bdce3ff3b..6f6ba100994df7deb1bdd3ca00d121f1c249f203 100644 (file)
@@ -1179,7 +1179,7 @@ static const u16 pinmux_data[] = {
  */
 #define PIN_NUMBER(row, col)           (1000+((row)-1)*34+(col)-1)
 
-static struct sh_pfc_pin pinmux_pins[] = {
+static const struct sh_pfc_pin pinmux_pins[] = {
        /* Table 25-1 (I/O and Pull U/D) */
        SH73A0_PIN_I_PD(0),
        SH73A0_PIN_I_PU(1),