diff options
| author | Thomas Weißschuh <[email protected]> | 2024-11-03 17:03:35 +0000 |
|---|---|---|
| committer | Greg Kroah-Hartman <[email protected]> | 2024-11-05 13:00:28 +0000 |
| commit | 94a20fb9af16417ab5fd17bcde3d906926f15ef6 (patch) | |
| tree | 9138c283d7bf7ba778b61c4dcc31052b09b36d1a /drivers/platform/x86/intel/pmt/class.c | |
| parent | sysfs: treewide: constify attribute callback of bin_is_visible() (diff) | |
| download | kernel-94a20fb9af16417ab5fd17bcde3d906926f15ef6.tar.gz kernel-94a20fb9af16417ab5fd17bcde3d906926f15ef6.zip | |
sysfs: treewide: constify attribute callback of bin_attribute::mmap()
The mmap() callbacks should not modify the struct
bin_attribute passed as argument.
Enforce this by marking the argument as const.
As there are not many callback implementers perform this change
throughout the tree at once.
Signed-off-by: Thomas Weißschuh <[email protected]>
Acked-by: Andrew Donnellan <[email protected]> # ocxl
Acked-by: Krzysztof Wilczyński <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Greg Kroah-Hartman <[email protected]>
Diffstat (limited to 'drivers/platform/x86/intel/pmt/class.c')
| -rw-r--r-- | drivers/platform/x86/intel/pmt/class.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/platform/x86/intel/pmt/class.c b/drivers/platform/x86/intel/pmt/class.c index c04bb7f97a4d..f9afa23e754b 100644 --- a/drivers/platform/x86/intel/pmt/class.c +++ b/drivers/platform/x86/intel/pmt/class.c @@ -103,7 +103,7 @@ intel_pmt_read(struct file *filp, struct kobject *kobj, static int intel_pmt_mmap(struct file *filp, struct kobject *kobj, - struct bin_attribute *attr, struct vm_area_struct *vma) + const struct bin_attribute *attr, struct vm_area_struct *vma) { struct intel_pmt_entry *entry = container_of(attr, struct intel_pmt_entry, |
