diff options
author | Geert Uytterhoeven <geert@linux-m68k.org> | 2013-11-18 08:33:01 -0500 |
---|---|---|
committer | Lee Jones <lee.jones@linaro.org> | 2014-01-06 04:13:24 -0500 |
commit | 6bbb3c4cb203a3c0596b845bd804d6a18dea7683 (patch) | |
tree | 2001f244aaa454c48b244be10739a0a509debf75 /drivers/mfd | |
parent | 9e146f43301caa69fca98c8036f11d940e0f29f9 (diff) |
mfd: stmicro: Constify struct mfd_cell where possible
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>
Diffstat (limited to 'drivers/mfd')
-rw-r--r-- | drivers/mfd/stmpe.c | 10 | ||||
-rw-r--r-- | drivers/mfd/stmpe.h | 2 |
2 files changed, 6 insertions, 6 deletions
diff --git a/drivers/mfd/stmpe.c b/drivers/mfd/stmpe.c index fff63a41862c..42ccd0544513 100644 --- a/drivers/mfd/stmpe.c +++ b/drivers/mfd/stmpe.c | |||
@@ -297,14 +297,14 @@ static struct resource stmpe_gpio_resources[] = { | |||
297 | }, | 297 | }, |
298 | }; | 298 | }; |
299 | 299 | ||
300 | static struct mfd_cell stmpe_gpio_cell = { | 300 | static const struct mfd_cell stmpe_gpio_cell = { |
301 | .name = "stmpe-gpio", | 301 | .name = "stmpe-gpio", |
302 | .of_compatible = "st,stmpe-gpio", | 302 | .of_compatible = "st,stmpe-gpio", |
303 | .resources = stmpe_gpio_resources, | 303 | .resources = stmpe_gpio_resources, |
304 | .num_resources = ARRAY_SIZE(stmpe_gpio_resources), | 304 | .num_resources = ARRAY_SIZE(stmpe_gpio_resources), |
305 | }; | 305 | }; |
306 | 306 | ||
307 | static struct mfd_cell stmpe_gpio_cell_noirq = { | 307 | static const struct mfd_cell stmpe_gpio_cell_noirq = { |
308 | .name = "stmpe-gpio", | 308 | .name = "stmpe-gpio", |
309 | .of_compatible = "st,stmpe-gpio", | 309 | .of_compatible = "st,stmpe-gpio", |
310 | /* gpio cell resources consist of an irq only so no resources here */ | 310 | /* gpio cell resources consist of an irq only so no resources here */ |
@@ -325,7 +325,7 @@ static struct resource stmpe_keypad_resources[] = { | |||
325 | }, | 325 | }, |
326 | }; | 326 | }; |
327 | 327 | ||
328 | static struct mfd_cell stmpe_keypad_cell = { | 328 | static const struct mfd_cell stmpe_keypad_cell = { |
329 | .name = "stmpe-keypad", | 329 | .name = "stmpe-keypad", |
330 | .of_compatible = "st,stmpe-keypad", | 330 | .of_compatible = "st,stmpe-keypad", |
331 | .resources = stmpe_keypad_resources, | 331 | .resources = stmpe_keypad_resources, |
@@ -409,7 +409,7 @@ static struct resource stmpe_ts_resources[] = { | |||
409 | }, | 409 | }, |
410 | }; | 410 | }; |
411 | 411 | ||
412 | static struct mfd_cell stmpe_ts_cell = { | 412 | static const struct mfd_cell stmpe_ts_cell = { |
413 | .name = "stmpe-ts", | 413 | .name = "stmpe-ts", |
414 | .of_compatible = "st,stmpe-ts", | 414 | .of_compatible = "st,stmpe-ts", |
415 | .resources = stmpe_ts_resources, | 415 | .resources = stmpe_ts_resources, |
@@ -1064,7 +1064,7 @@ static int stmpe_chip_init(struct stmpe *stmpe) | |||
1064 | return stmpe_reg_write(stmpe, stmpe->regs[STMPE_IDX_ICR_LSB], icr); | 1064 | return stmpe_reg_write(stmpe, stmpe->regs[STMPE_IDX_ICR_LSB], icr); |
1065 | } | 1065 | } |
1066 | 1066 | ||
1067 | static int stmpe_add_device(struct stmpe *stmpe, struct mfd_cell *cell) | 1067 | static int stmpe_add_device(struct stmpe *stmpe, const struct mfd_cell *cell) |
1068 | { | 1068 | { |
1069 | return mfd_add_devices(stmpe->dev, stmpe->pdata->id, cell, 1, | 1069 | return mfd_add_devices(stmpe->dev, stmpe->pdata->id, cell, 1, |
1070 | NULL, stmpe->irq_base, stmpe->domain); | 1070 | NULL, stmpe->irq_base, stmpe->domain); |
diff --git a/drivers/mfd/stmpe.h b/drivers/mfd/stmpe.h index ff2b09ba8797..6639f1b0fef5 100644 --- a/drivers/mfd/stmpe.h +++ b/drivers/mfd/stmpe.h | |||
@@ -38,7 +38,7 @@ static inline void stmpe_dump_bytes(const char *str, const void *buf, | |||
38 | * enable and altfunc callbacks | 38 | * enable and altfunc callbacks |
39 | */ | 39 | */ |
40 | struct stmpe_variant_block { | 40 | struct stmpe_variant_block { |
41 | struct mfd_cell *cell; | 41 | const struct mfd_cell *cell; |
42 | int irq; | 42 | int irq; |
43 | enum stmpe_block block; | 43 | enum stmpe_block block; |
44 | }; | 44 | }; |