Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 2f55ac07 authored by Lionel Debroux's avatar Lionel Debroux Committed by Jiri Kosina
Browse files

suspend: constify platform_suspend_ops



While at it, fix two checkpatch errors.
Several non-const struct instances constified by this patch were added after
the introduction of platform_suspend_ops in checkpatch.pl's list of "should
be const" structs (79404849).

Patch against mainline.
Inspired by hunks of the grsecurity patch, updated for newer kernels.

Signed-off-by: default avatarLionel Debroux <lionel_debroux@yahoo.fr>
Acked-by: default avatarIngo Molnar <mingo@elte.hu>
Signed-off-by: default avatarJiri Kosina <jkosina@suse.cz>
parent acc2472e
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -301,7 +301,7 @@ static void at91_pm_end(void)
}


static struct platform_suspend_ops at91_pm_ops ={
static const struct platform_suspend_ops at91_pm_ops = {
	.valid	= at91_pm_valid_state,
	.begin	= at91_pm_begin,
	.enter	= at91_pm_enter,
+1 −1
Original line number Diff line number Diff line
@@ -110,7 +110,7 @@ static int davinci_pm_enter(suspend_state_t state)
	return ret;
}

static struct platform_suspend_ops davinci_pm_ops = {
static const struct platform_suspend_ops davinci_pm_ops = {
	.enter		= davinci_pm_enter,
	.valid		= suspend_valid_only_mem,
};
+1 −1
Original line number Diff line number Diff line
@@ -32,7 +32,7 @@ static int mx27_suspend_enter(suspend_state_t state)
	return 0;
}

static struct platform_suspend_ops mx27_suspend_ops = {
static const struct platform_suspend_ops mx27_suspend_ops = {
	.enter = mx27_suspend_enter,
	.valid = suspend_valid_only_mem,
};
+1 −1
Original line number Diff line number Diff line
@@ -123,7 +123,7 @@ static int lpc32xx_pm_enter(suspend_state_t state)
	return 0;
}

static struct platform_suspend_ops lpc32xx_pm_ops = {
static const struct platform_suspend_ops lpc32xx_pm_ops = {
	.valid	= suspend_valid_only_mem,
	.enter	= lpc32xx_pm_enter,
};
+1 −1
Original line number Diff line number Diff line
@@ -647,7 +647,7 @@ static struct irqaction omap_wakeup_irq = {



static struct platform_suspend_ops omap_pm_ops ={
static const struct platform_suspend_ops omap_pm_ops = {
	.prepare	= omap_pm_prepare,
	.enter		= omap_pm_enter,
	.finish		= omap_pm_finish,
Loading