Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

fsi: core: Use const 'struct bin_attribute' callbacks

The sysfs core now provides callback variants that explicitly take a
const pointer. Make use of it to match the attribute definition.

Signed-off-by: Thomas Weißschuh <linux@weissschuh.net>
Reviewed-by: Eddie James <eajames@linux.ibm.com>
Link: https://lore.kernel.org/r/20241215-sysfs-const-bin_attr-fsi-v1-1-b717f76a0146@weissschuh.net
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

authored by

Thomas Weißschuh and committed by
Greg Kroah-Hartman
4ab02798 600aa8d3

+4 -4
+4 -4
drivers/fsi/fsi-core.c
··· 554 554 } 555 555 556 556 static ssize_t fsi_slave_sysfs_raw_read(struct file *file, 557 - struct kobject *kobj, struct bin_attribute *attr, char *buf, 557 + struct kobject *kobj, const struct bin_attribute *attr, char *buf, 558 558 loff_t off, size_t count) 559 559 { 560 560 struct fsi_slave *slave = to_fsi_slave(kobj_to_dev(kobj)); ··· 581 581 } 582 582 583 583 static ssize_t fsi_slave_sysfs_raw_write(struct file *file, 584 - struct kobject *kobj, struct bin_attribute *attr, 584 + struct kobject *kobj, const struct bin_attribute *attr, 585 585 char *buf, loff_t off, size_t count) 586 586 { 587 587 struct fsi_slave *slave = to_fsi_slave(kobj_to_dev(kobj)); ··· 613 613 .mode = 0600, 614 614 }, 615 615 .size = 0, 616 - .read = fsi_slave_sysfs_raw_read, 617 - .write = fsi_slave_sysfs_raw_write, 616 + .read_new = fsi_slave_sysfs_raw_read, 617 + .write_new = fsi_slave_sysfs_raw_write, 618 618 }; 619 619 620 620 static void fsi_slave_release(struct device *dev)