diff options
author | Thomas Weißschuh <linux@weissschuh.net> | 2024-11-03 18:03:39 +0100 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2024-11-05 14:00:28 +0100 |
commit | 562e932a077cb35173d8dc11e5005f9c5acd22f0 (patch) | |
tree | b56484e8d2d0d75726021d55e88d69228eb1afe3 /drivers/base/node.c | |
parent | sysfs: bin_attribute: add const read/write callback variants (diff) | |
download | linux-562e932a077cb35173d8dc11e5005f9c5acd22f0.tar.xz linux-562e932a077cb35173d8dc11e5005f9c5acd22f0.zip |
driver core: Constify attribute arguments of binary attributes
As preparation for the constification of struct bin_attribute,
constify the arguments of the read and write callbacks.
Signed-off-by: Thomas Weißschuh <linux@weissschuh.net>
Acked-by: Krzysztof Wilczyński <kw@linux.com>
Link: https://lore.kernel.org/r/20241103-sysfs-const-bin_attr-v2-10-71110628844c@weissschuh.net
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/base/node.c')
-rw-r--r-- | drivers/base/node.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/base/node.c b/drivers/base/node.c index eb72580288e6..3e761633ac75 100644 --- a/drivers/base/node.c +++ b/drivers/base/node.c @@ -27,7 +27,7 @@ static const struct bus_type node_subsys = { }; static inline ssize_t cpumap_read(struct file *file, struct kobject *kobj, - struct bin_attribute *attr, char *buf, + const struct bin_attribute *attr, char *buf, loff_t off, size_t count) { struct device *dev = kobj_to_dev(kobj); @@ -48,7 +48,7 @@ static inline ssize_t cpumap_read(struct file *file, struct kobject *kobj, static BIN_ATTR_RO(cpumap, CPUMAP_FILE_MAX_BYTES); static inline ssize_t cpulist_read(struct file *file, struct kobject *kobj, - struct bin_attribute *attr, char *buf, + const struct bin_attribute *attr, char *buf, loff_t off, size_t count) { struct device *dev = kobj_to_dev(kobj); |