mirror of
https://github.com/torvalds/linux.git
synced 2026-05-29 17:43:52 +02:00
devcoredump: Define 'struct bin_attribute' through macro
The macro saves some lines of code and simplifies the constification of the attribute. Signed-off-by: Thomas Weißschuh <linux@weissschuh.net> Link: https://lore.kernel.org/r/20250114-sysfs-const-bin_attr-devcoredump-v1-1-fa93be30efae@weissschuh.net Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
e3a89cc281
commit
bf1ad6c869
|
|
@ -132,12 +132,8 @@ static ssize_t devcd_data_write(struct file *filp, struct kobject *kobj,
|
|||
return count;
|
||||
}
|
||||
|
||||
static struct bin_attribute devcd_attr_data = {
|
||||
.attr = { .name = "data", .mode = S_IRUSR | S_IWUSR, },
|
||||
.size = 0,
|
||||
.read = devcd_data_read,
|
||||
.write = devcd_data_write,
|
||||
};
|
||||
static struct bin_attribute devcd_attr_data =
|
||||
__BIN_ATTR(data, 0600, devcd_data_read, devcd_data_write, 0);
|
||||
|
||||
static struct bin_attribute *devcd_dev_bin_attrs[] = {
|
||||
&devcd_attr_data, NULL,
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user