diff options
author | Thomas Weißschuh <linux@weissschuh.net> | 2024-12-15 15:49:11 +0100 |
---|---|---|
committer | Tzung-Bi Shih <tzungbi@kernel.org> | 2024-12-17 03:59:31 +0000 |
commit | 093d752032f723da665cdaa6077ee62b3931e48b (patch) | |
tree | 63567f035252e78039a453c124cd30a666db1101 | |
parent | 7da14dea76fb6a90f62938e6dfa9f34c980af358 (diff) |
firmware: google: memconsole: Use const 'struct bin_attribute' callback
The sysfs core now provides callback variants that explicitly take a
const pointer. Use them so the non-const variants can be removed.
Signed-off-by: Thomas Weißschuh <linux@weissschuh.net>
Acked-by: Brian Norris <briannorris@chromium.org>
Link: https://lore.kernel.org/r/20241215-sysfs-const-bin_attr-google-v1-3-e5c2808f5833@weissschuh.net
Signed-off-by: Tzung-Bi Shih <tzungbi@kernel.org>
-rw-r--r-- | drivers/firmware/google/memconsole.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/firmware/google/memconsole.c b/drivers/firmware/google/memconsole.c index b9d99fe1ff0f..d957af6f9349 100644 --- a/drivers/firmware/google/memconsole.c +++ b/drivers/firmware/google/memconsole.c @@ -14,7 +14,7 @@ #include "memconsole.h" static ssize_t memconsole_read(struct file *filp, struct kobject *kobp, - struct bin_attribute *bin_attr, char *buf, + const struct bin_attribute *bin_attr, char *buf, loff_t pos, size_t count) { ssize_t (*memconsole_read_func)(char *, loff_t, size_t); @@ -28,7 +28,7 @@ static ssize_t memconsole_read(struct file *filp, struct kobject *kobp, static struct bin_attribute memconsole_bin_attr = { .attr = {.name = "log", .mode = 0444}, - .read = memconsole_read, + .read_new = memconsole_read, }; void memconsole_setup(ssize_t (*read_func)(char *, loff_t, size_t)) |