mirror of
git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-09-18 22:14:16 +00:00
efi/mokvar: 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> Link: https://lore.kernel.org/r/20241215-sysfs-const-bin_attr-mokvar-v1-1-d5a3d1fff8d1@weissschuh.net Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
f9c883f0df
commit
ae7a15fb29
1 changed files with 2 additions and 2 deletions
|
@ -266,7 +266,7 @@ struct efi_mokvar_table_entry *efi_mokvar_entry_find(const char *name)
|
|||
* amount of data in this mokvar config table entry.
|
||||
*/
|
||||
static ssize_t efi_mokvar_sysfs_read(struct file *file, struct kobject *kobj,
|
||||
struct bin_attribute *bin_attr, char *buf,
|
||||
const struct bin_attribute *bin_attr, char *buf,
|
||||
loff_t off, size_t count)
|
||||
{
|
||||
struct efi_mokvar_table_entry *mokvar_entry = bin_attr->private;
|
||||
|
@ -343,7 +343,7 @@ static int __init efi_mokvar_sysfs_init(void)
|
|||
mokvar_sysfs->bin_attr.attr.name = mokvar_entry->name;
|
||||
mokvar_sysfs->bin_attr.attr.mode = 0400;
|
||||
mokvar_sysfs->bin_attr.size = mokvar_entry->data_size;
|
||||
mokvar_sysfs->bin_attr.read = efi_mokvar_sysfs_read;
|
||||
mokvar_sysfs->bin_attr.read_new = efi_mokvar_sysfs_read;
|
||||
|
||||
err = sysfs_create_bin_file(mokvar_kobj,
|
||||
&mokvar_sysfs->bin_attr);
|
||||
|
|
Loading…
Add table
Reference in a new issue