Skip to content

Commit 45ef22b

Browse files
t-8chhverkuil
authored andcommitted
media: solo6x10: 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]> Signed-off-by: Hans Verkuil <[email protected]>
1 parent db6efc5 commit 45ef22b

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

drivers/media/pci/solo6x10/solo6x10-core.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -362,7 +362,7 @@ static ssize_t sdram_offsets_show(struct device *dev,
362362
}
363363

364364
static ssize_t sdram_show(struct file *file, struct kobject *kobj,
365-
struct bin_attribute *a, char *buf,
365+
const struct bin_attribute *a, char *buf,
366366
loff_t off, size_t count)
367367
{
368368
struct device *dev = kobj_to_dev(kobj);
@@ -432,7 +432,7 @@ static int solo_sysfs_init(struct solo_dev *solo_dev)
432432
sysfs_attr_init(&sdram_attr->attr);
433433
sdram_attr->attr.name = "sdram";
434434
sdram_attr->attr.mode = 0440;
435-
sdram_attr->read = sdram_show;
435+
sdram_attr->read_new = sdram_show;
436436
sdram_attr->size = solo_dev->sdram_size;
437437

438438
if (device_create_bin_file(dev, sdram_attr)) {

0 commit comments

Comments
 (0)