mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-28 18:51:56 -04:00
[PATCH] mark struct file_operations const 1
Many struct file_operations in the kernel can be "const". Marking them const moves these to the .rodata section, which avoids false sharing with potential dirty data. In addition it'll catch accidental writes at compile time to these shared resources. Signed-off-by: Arjan van de Ven <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
This commit is contained in:
parent
f59e5e8209
commit
540473208f
9 changed files with 13 additions and 13 deletions
|
|
@ -447,7 +447,7 @@ struct snd_pcm_notify {
|
|||
* Registering
|
||||
*/
|
||||
|
||||
extern struct file_operations snd_pcm_f_ops[2];
|
||||
extern const struct file_operations snd_pcm_f_ops[2];
|
||||
|
||||
int snd_pcm_new(struct snd_card *card, char *id, int device,
|
||||
int playback_count, int capture_count,
|
||||
|
|
|
|||
Loading…
Reference in a new issue