mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 11:11:45 -04:00
kernel/ksysfs.c: add __ro_after_init to bin_attribute structure
The object notes_attr of type bin_attribute is not modified after getting initailized by ksysfs_init. Apart from initialization in ksysfs_init it is also passed as an argument to the function sysfs_create_bin_file but this argument is of type const. Therefore, add __ro_after_init to its declaration. Link: http://lkml.kernel.org/r/[email protected] Signed-off-by: Bhumika Goyal <[email protected]> Acked-by: Kees Cook <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
This commit is contained in:
parent
3e6daded1f
commit
738bc38d49
1 changed files with 1 additions and 1 deletions
|
|
@ -195,7 +195,7 @@ static ssize_t notes_read(struct file *filp, struct kobject *kobj,
|
|||
return count;
|
||||
}
|
||||
|
||||
static struct bin_attribute notes_attr = {
|
||||
static struct bin_attribute notes_attr __ro_after_init = {
|
||||
.attr = {
|
||||
.name = "notes",
|
||||
.mode = S_IRUGO,
|
||||
|
|
|
|||
Loading…
Reference in a new issue