aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/pinctrl
diff options
context:
space:
mode:
authorKrzysztof Kozlowski <krzk@kernel.org>2017-05-23 20:41:39 +0200
committerKrzysztof Kozlowski <krzk@kernel.org>2017-06-07 20:40:47 +0200
commit71b96c3a8a2d35f74ca7559f9d1b123d97da6f4f (patch)
tree5ca7dfe34de283ae44669713c8054cee44efe56e /drivers/pinctrl
parentpinctrl: samsung: Split Exynos drivers per ARMv7 and ARMv8 (diff)
downloadlinux-dev-71b96c3a8a2d35f74ca7559f9d1b123d97da6f4f.tar.xz
linux-dev-71b96c3a8a2d35f74ca7559f9d1b123d97da6f4f.zip
pinctrl: samsung: Constify wakeup driver specific data
Static exynos_irq_chip structures, containing driver specific data, are referenced only through opaque data pointer in const of_device_id table. The contents of pointed memory (exynos_irq_chip structure itself) is then copied with kmemdup() during wakeup initialization so exynos_irq_chip can be made const for code safenes. Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
Diffstat (limited to 'drivers/pinctrl')
-rw-r--r--drivers/pinctrl/samsung/pinctrl-exynos.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/pinctrl/samsung/pinctrl-exynos.c b/drivers/pinctrl/samsung/pinctrl-exynos.c
index 0dbd1f58dad5..727462cc670c 100644
--- a/drivers/pinctrl/samsung/pinctrl-exynos.c
+++ b/drivers/pinctrl/samsung/pinctrl-exynos.c
@@ -363,7 +363,7 @@ static int exynos_wkup_irq_set_wake(struct irq_data *irqd, unsigned int on)
/*
* irq_chip for wakeup interrupts
*/
-static struct exynos_irq_chip exynos4210_wkup_irq_chip __initdata = {
+static const struct exynos_irq_chip exynos4210_wkup_irq_chip __initconst = {
.chip = {
.name = "exynos4210_wkup_irq_chip",
.irq_unmask = exynos_irq_unmask,
@@ -379,7 +379,7 @@ static struct exynos_irq_chip exynos4210_wkup_irq_chip __initdata = {
.eint_pend = EXYNOS_WKUP_EPEND_OFFSET,
};
-static struct exynos_irq_chip exynos7_wkup_irq_chip __initdata = {
+static const struct exynos_irq_chip exynos7_wkup_irq_chip __initconst = {
.chip = {
.name = "exynos7_wkup_irq_chip",
.irq_unmask = exynos_irq_unmask,