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 (79404849e9
).
Patch against mainline.
Inspired by hunks of the grsecurity patch, updated for newer kernels.
Signed-off-by: Lionel Debroux <lionel_debroux@yahoo.fr>
Acked-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
This commit is contained in:

committed by
Jiri Kosina

parent
acc2472ed3
commit
2f55ac072f
@@ -122,7 +122,7 @@ struct platform_suspend_ops {
|
||||
* suspend_set_ops - set platform dependent suspend operations
|
||||
* @ops: The new suspend operations to set.
|
||||
*/
|
||||
extern void suspend_set_ops(struct platform_suspend_ops *ops);
|
||||
extern void suspend_set_ops(const struct platform_suspend_ops *ops);
|
||||
extern int suspend_valid_only_mem(suspend_state_t state);
|
||||
|
||||
/**
|
||||
@@ -147,7 +147,7 @@ extern int pm_suspend(suspend_state_t state);
|
||||
#else /* !CONFIG_SUSPEND */
|
||||
#define suspend_valid_only_mem NULL
|
||||
|
||||
static inline void suspend_set_ops(struct platform_suspend_ops *ops) {}
|
||||
static inline void suspend_set_ops(const struct platform_suspend_ops *ops) {}
|
||||
static inline int pm_suspend(suspend_state_t state) { return -ENOSYS; }
|
||||
#endif /* !CONFIG_SUSPEND */
|
||||
|
||||
|
Reference in New Issue
Block a user