]> Pileus Git - ~andy/linux/commitdiff
mfd: Constify struct mfd_cell where possible
authorGeert Uytterhoeven <geert@linux-m68k.org>
Mon, 18 Nov 2013 13:33:06 +0000 (14:33 +0100)
committerLee Jones <lee.jones@linaro.org>
Mon, 6 Jan 2014 09:13:29 +0000 (09:13 +0000)
As of commit 03e361b25ee8dfb1fd9b890072c23c4aae01c6c7 ("mfd: Stop setting
refcounting pointers in original mfd_cell arrays"), the "cell" parameter of
mfd_add_devices() is "const" again. Hence make all cell data passed to
mfd_add_devices() const where possible.

Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
16 files changed:
drivers/mfd/ab8500-core.c
drivers/mfd/arizona-core.c
drivers/mfd/as3722.c
drivers/mfd/asic3.c
drivers/mfd/cros_ec.c
drivers/mfd/db8500-prcmu.c
drivers/mfd/htc-pasic3.c
drivers/mfd/jz4740-adc.c
drivers/mfd/lp8788.c
drivers/mfd/rc5t583.c
drivers/mfd/rdc321x-southbridge.c
drivers/mfd/retu-mfd.c
drivers/mfd/sec-core.c
drivers/mfd/timberdale.c
drivers/mfd/viperboard.c
drivers/mfd/vx855.c

index b6c2cdc76091aa2ff78b8d1d17e3c7b6e6d1dbd0..6788064ed899d1407978375d03e51a41fa412de9 100644 (file)
@@ -1017,7 +1017,7 @@ static struct resource ab8500_temp_resources[] = {
        },
 };
 
-static struct mfd_cell ab8500_bm_devs[] = {
+static const struct mfd_cell ab8500_bm_devs[] = {
        {
                .name = "ab8500-charger",
                .of_compatible = "stericsson,ab8500-charger",
@@ -1052,7 +1052,7 @@ static struct mfd_cell ab8500_bm_devs[] = {
        },
 };
 
-static struct mfd_cell ab8500_devs[] = {
+static const struct mfd_cell ab8500_devs[] = {
 #ifdef CONFIG_DEBUG_FS
        {
                .name = "ab8500-debug",
@@ -1143,7 +1143,7 @@ static struct mfd_cell ab8500_devs[] = {
        },
 };
 
-static struct mfd_cell ab9540_devs[] = {
+static const struct mfd_cell ab9540_devs[] = {
 #ifdef CONFIG_DEBUG_FS
        {
                .name = "ab8500-debug",
@@ -1214,7 +1214,7 @@ static struct mfd_cell ab9540_devs[] = {
 };
 
 /* Device list for ab8505  */
-static struct mfd_cell ab8505_devs[] = {
+static const struct mfd_cell ab8505_devs[] = {
 #ifdef CONFIG_DEBUG_FS
        {
                .name = "ab8500-debug",
@@ -1275,7 +1275,7 @@ static struct mfd_cell ab8505_devs[] = {
        },
 };
 
-static struct mfd_cell ab8540_devs[] = {
+static const struct mfd_cell ab8540_devs[] = {
 #ifdef CONFIG_DEBUG_FS
        {
                .name = "ab8500-debug",
@@ -1339,7 +1339,7 @@ static struct mfd_cell ab8540_devs[] = {
        },
 };
 
-static struct mfd_cell ab8540_cut1_devs[] = {
+static const struct mfd_cell ab8540_cut1_devs[] = {
        {
                .name = "ab8500-rtc",
                .of_compatible = "stericsson,ab8500-rtc",
@@ -1348,7 +1348,7 @@ static struct mfd_cell ab8540_cut1_devs[] = {
        },
 };
 
-static struct mfd_cell ab8540_cut2_devs[] = {
+static const struct mfd_cell ab8540_cut2_devs[] = {
        {
                .name = "ab8540-rtc",
                .of_compatible = "stericsson,ab8540-rtc",
index 75e180ceecf3fac16f9a432ada482130624dfe01..a45aab9f6bb135e64c0f0a420f75ed2508e17e92 100644 (file)
@@ -565,7 +565,7 @@ static inline int arizona_of_get_core_pdata(struct arizona *arizona)
 }
 #endif
 
-static struct mfd_cell early_devs[] = {
+static const struct mfd_cell early_devs[] = {
        { .name = "arizona-ldo1" },
 };
 
@@ -577,7 +577,7 @@ static const char *wm5102_supplies[] = {
        "SPKVDDR",
 };
 
-static struct mfd_cell wm5102_devs[] = {
+static const struct mfd_cell wm5102_devs[] = {
        { .name = "arizona-micsupp" },
        { .name = "arizona-extcon" },
        { .name = "arizona-gpio" },
@@ -590,7 +590,7 @@ static struct mfd_cell wm5102_devs[] = {
        },
 };
 
-static struct mfd_cell wm5110_devs[] = {
+static const struct mfd_cell wm5110_devs[] = {
        { .name = "arizona-micsupp" },
        { .name = "arizona-extcon" },
        { .name = "arizona-gpio" },
@@ -609,7 +609,7 @@ static const char *wm8997_supplies[] = {
        "SPKVDD",
 };
 
-static struct mfd_cell wm8997_devs[] = {
+static const struct mfd_cell wm8997_devs[] = {
        { .name = "arizona-micsupp" },
        { .name = "arizona-extcon" },
        { .name = "arizona-gpio" },
index f161f2e00df7434ee8970584e76392af68304179..2d9b728a19f821b8718f6d94349b0fd8e2aa01a6 100644 (file)
@@ -54,7 +54,7 @@ static const struct resource as3722_adc_resource[] = {
        },
 };
 
-static struct mfd_cell as3722_devs[] = {
+static const struct mfd_cell as3722_devs[] = {
        {
                .name = "as3722-pinctrl",
        },
index fa22154c84e49cfb6be58930339ea180b8be77b6..9f6294f2a0708ab6be063d4bfbc0f98ad1062fa5 100644 (file)
@@ -695,7 +695,7 @@ static int ds1wm_disable(struct platform_device *pdev)
        return 0;
 }
 
-static struct mfd_cell asic3_cell_ds1wm = {
+static const struct mfd_cell asic3_cell_ds1wm = {
        .name          = "ds1wm",
        .enable        = ds1wm_enable,
        .disable       = ds1wm_disable,
@@ -797,7 +797,7 @@ static int asic3_mmc_disable(struct platform_device *pdev)
        return 0;
 }
 
-static struct mfd_cell asic3_cell_mmc = {
+static const struct mfd_cell asic3_cell_mmc = {
        .name          = "tmio-mmc",
        .enable        = asic3_mmc_enable,
        .disable       = asic3_mmc_disable,
index 1f36885d674b07741a4f0374089f2cb04ed839e4..783fe2e73e1edd43344d3bb4c3b1fb09daf9cf3d 100644 (file)
@@ -84,7 +84,7 @@ static irqreturn_t ec_irq_thread(int irq, void *data)
        return IRQ_HANDLED;
 }
 
-static struct mfd_cell cros_devs[] = {
+static const struct mfd_cell cros_devs[] = {
        {
                .name = "cros-ec-keyb",
                .id = 1,
index b9ce60c301de026bba38daf276e83773c44379ec..e43e6e821117a01aac56b8e4086fe783056977cd 100644 (file)
@@ -3070,7 +3070,7 @@ static struct db8500_thsens_platform_data db8500_thsens_data = {
        .num_trips = 4,
 };
 
-static struct mfd_cell common_prcmu_devs[] = {
+static const struct mfd_cell common_prcmu_devs[] = {
        {
                .name = "ux500_wdt",
                .platform_data = &db8500_wdt_pdata,
@@ -3079,7 +3079,7 @@ static struct mfd_cell common_prcmu_devs[] = {
        },
 };
 
-static struct mfd_cell db8500_prcmu_devs[] = {
+static const struct mfd_cell db8500_prcmu_devs[] = {
        {
                .name = "db8500-prcmu-regulators",
                .of_compatible = "stericsson,db8500-prcmu-regulator",
index 6bf92a507b9546b911e258037c2dba3ac391851b..e88d4f6fef4cb80b76bdea85498056e6b272874a 100644 (file)
@@ -114,7 +114,7 @@ static struct resource ds1wm_resources[] __initdata = {
        },
 };
 
-static struct mfd_cell ds1wm_cell __initdata = {
+static const struct mfd_cell ds1wm_cell __initconst = {
        .name          = "ds1wm",
        .enable        = ds1wm_enable,
        .disable       = ds1wm_disable,
index 3c0e8cf6916bd0f9cdb040548b7b7919d3f49753..7a51c0d0d4f1f5ec23b323550424cec4ff6386a7 100644 (file)
@@ -181,7 +181,7 @@ static struct resource jz4740_battery_resources[] = {
        },
 };
 
-static struct mfd_cell jz4740_adc_cells[] = {
+static const struct mfd_cell jz4740_adc_cells[] = {
        {
                .id = 0,
                .name = "jz4740-hwmon",
index 0f1221911018b6d4fd4e558ff0df4996a4b70a10..a30bc15fe5ba5ac6a5b2a04a23a3a518ae2d2ba5 100644 (file)
@@ -71,7 +71,7 @@ static struct resource rtc_irqs[] = {
        },
 };
 
-static struct mfd_cell lp8788_devs[] = {
+static const struct mfd_cell lp8788_devs[] = {
        /* 4 bucks */
        MFD_DEV_WITH_ID(BUCK, 1),
        MFD_DEV_WITH_ID(BUCK, 2),
index 346330176afcd81ba9f6a294420db761e60ab908..df276ad9f40bfb32639c78b28ad7f2155e1f749f 100644 (file)
@@ -74,7 +74,7 @@ static struct deepsleep_control_data deepsleep_data[] = {
 #define EXT_PWR_REQ            \
        (RC5T583_EXT_PWRREQ1_CONTROL | RC5T583_EXT_PWRREQ2_CONTROL)
 
-static struct mfd_cell rc5t583_subdevs[] = {
+static const struct mfd_cell rc5t583_subdevs[] = {
        {.name = "rc5t583-gpio",},
        {.name = "rc5t583-regulator",},
        {.name = "rc5t583-rtc",      },
index 21b7bef73507cc969ae49074873f47b64b3ebe99..aab63ee043e3d7f623ab12fc2bd31c2def0f95cd 100644 (file)
@@ -56,7 +56,7 @@ static struct resource rdc321x_gpio_resources[] = {
        }
 };
 
-static struct mfd_cell rdc321x_sb_cells[] = {
+static const struct mfd_cell rdc321x_sb_cells[] = {
        {
                .name           = "rdc321x-wdt",
                .resources      = rdc321x_wdt_resource,
index a1830986eeb71006b9c693e0aab1bb5e25d98e81..c8f345f7e9a2b574c69d5c2d47fa3dbcf1390993 100644 (file)
@@ -55,7 +55,7 @@ static struct resource retu_pwrbutton_res[] = {
        },
 };
 
-static struct mfd_cell retu_devs[] = {
+static const struct mfd_cell retu_devs[] = {
        {
                .name           = "retu-wdt"
        },
@@ -94,7 +94,7 @@ static struct resource tahvo_usb_res[] = {
        },
 };
 
-static struct mfd_cell tahvo_devs[] = {
+static const struct mfd_cell tahvo_devs[] = {
        {
                .name           = "tahvo-usb",
                .resources      = tahvo_usb_res,
@@ -122,7 +122,7 @@ static const struct retu_data {
        char                    *chip_name;
        char                    *companion_name;
        struct regmap_irq_chip  *irq_chip;
-       struct mfd_cell         *children;
+       const struct mfd_cell   *children;
        int                     nchildren;
 } retu_data[] = {
        [0] = {
index 54cc25546592c7c7a1ba113104ca96fa5cacab83..b31824c33e15215b437c981355aa0cd883d3a277 100644 (file)
@@ -31,7 +31,7 @@
 #include <linux/mfd/samsung/s5m8767.h>
 #include <linux/regmap.h>
 
-static struct mfd_cell s5m8751_devs[] = {
+static const struct mfd_cell s5m8751_devs[] = {
        {
                .name = "s5m8751-pmic",
        }, {
@@ -41,7 +41,7 @@ static struct mfd_cell s5m8751_devs[] = {
        },
 };
 
-static struct mfd_cell s5m8763_devs[] = {
+static const struct mfd_cell s5m8763_devs[] = {
        {
                .name = "s5m8763-pmic",
        }, {
@@ -51,7 +51,7 @@ static struct mfd_cell s5m8763_devs[] = {
        },
 };
 
-static struct mfd_cell s5m8767_devs[] = {
+static const struct mfd_cell s5m8767_devs[] = {
        {
                .name = "s5m8767-pmic",
        }, {
@@ -59,7 +59,7 @@ static struct mfd_cell s5m8767_devs[] = {
        },
 };
 
-static struct mfd_cell s2mps11_devs[] = {
+static const struct mfd_cell s2mps11_devs[] = {
        {
                .name = "s2mps11-pmic",
        }, {
index dbb34f94e5e3fce2e0df7f18097930558069af2f..c6668ac70af3c0ff6e107e10ca8346202032b217 100644 (file)
@@ -374,7 +374,7 @@ static const struct resource timberdale_dma_resources[] = {
        },
 };
 
-static struct mfd_cell timberdale_cells_bar0_cfg0[] = {
+static const struct mfd_cell timberdale_cells_bar0_cfg0[] = {
        {
                .name = "timb-dma",
                .num_resources = ARRAY_SIZE(timberdale_dma_resources),
@@ -431,7 +431,7 @@ static struct mfd_cell timberdale_cells_bar0_cfg0[] = {
        },
 };
 
-static struct mfd_cell timberdale_cells_bar0_cfg1[] = {
+static const struct mfd_cell timberdale_cells_bar0_cfg1[] = {
        {
                .name = "timb-dma",
                .num_resources = ARRAY_SIZE(timberdale_dma_resources),
@@ -498,7 +498,7 @@ static struct mfd_cell timberdale_cells_bar0_cfg1[] = {
        },
 };
 
-static struct mfd_cell timberdale_cells_bar0_cfg2[] = {
+static const struct mfd_cell timberdale_cells_bar0_cfg2[] = {
        {
                .name = "timb-dma",
                .num_resources = ARRAY_SIZE(timberdale_dma_resources),
@@ -548,7 +548,7 @@ static struct mfd_cell timberdale_cells_bar0_cfg2[] = {
        },
 };
 
-static struct mfd_cell timberdale_cells_bar0_cfg3[] = {
+static const struct mfd_cell timberdale_cells_bar0_cfg3[] = {
        {
                .name = "timb-dma",
                .num_resources = ARRAY_SIZE(timberdale_dma_resources),
@@ -619,7 +619,7 @@ static const struct resource timberdale_sdhc_resources[] = {
        },
 };
 
-static struct mfd_cell timberdale_cells_bar1[] = {
+static const struct mfd_cell timberdale_cells_bar1[] = {
        {
                .name = "sdhci",
                .num_resources = ARRAY_SIZE(timberdale_sdhc_resources),
@@ -627,7 +627,7 @@ static struct mfd_cell timberdale_cells_bar1[] = {
        },
 };
 
-static struct mfd_cell timberdale_cells_bar2[] = {
+static const struct mfd_cell timberdale_cells_bar2[] = {
        {
                .name = "sdhci",
                .num_resources = ARRAY_SIZE(timberdale_sdhc_resources),
index af2a6703f34fa89d6a6c68397c91104ab768f6fe..e00f5340ed872089d31998ff39d6bb57842e731a 100644 (file)
@@ -37,7 +37,7 @@ static const struct usb_device_id vprbrd_table[] = {
 
 MODULE_DEVICE_TABLE(usb, vprbrd_table);
 
-static struct mfd_cell vprbrd_devs[] = {
+static const struct mfd_cell vprbrd_devs[] = {
        {
                .name = "viperboard-gpio",
        },
index 757ecc63338c19a7d7d75c85e4a185459fb3d3a0..5cd5661158bc6f4716fce4de4cb4e3b781c4a3e9 100644 (file)
@@ -60,7 +60,7 @@ static struct resource vx855_gpio_resources[] = {
        },
 };
 
-static struct mfd_cell vx855_cells[] = {
+static const struct mfd_cell vx855_cells[] = {
        {
                .name = "vx855_gpio",
                .num_resources = ARRAY_SIZE(vx855_gpio_resources),