Skip to content

Commit 093d752

Browse files
t-8chTzung-Bi Shih
authored andcommitted
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 <[email protected]> Acked-by: Brian Norris <[email protected]> Link: https://lore.kernel.org/r/20241215-sysfs-const-bin_attr-google-v1-3-e5c2808f5833@weissschuh.net Signed-off-by: Tzung-Bi Shih <[email protected]>
1 parent 7da14de commit 093d752

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

drivers/firmware/google/memconsole.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
#include "memconsole.h"
1515

1616
static ssize_t memconsole_read(struct file *filp, struct kobject *kobp,
17-
struct bin_attribute *bin_attr, char *buf,
17+
const struct bin_attribute *bin_attr, char *buf,
1818
loff_t pos, size_t count)
1919
{
2020
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,
2828

2929
static struct bin_attribute memconsole_bin_attr = {
3030
.attr = {.name = "log", .mode = 0444},
31-
.read = memconsole_read,
31+
.read_new = memconsole_read,
3232
};
3333

3434
void memconsole_setup(ssize_t (*read_func)(char *, loff_t, size_t))

0 commit comments

Comments
 (0)