Skip to content

Commit

Permalink
pinctrl: samsung: Constify wakeup driver specific data
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Krzysztof Kozlowski committed Jun 7, 2017
1 parent cfa76dd commit 71b96c3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/pinctrl/samsung/pinctrl-exynos.c
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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,
Expand Down

0 comments on commit 71b96c3

Please sign in to comment.