File tree Expand file tree Collapse file tree 1 file changed +11
-2
lines changed Expand file tree Collapse file tree 1 file changed +11
-2
lines changed Original file line number Diff line number Diff line change @@ -303,11 +303,19 @@ static umode_t nvmem_bin_attr_is_visible(struct kobject *kobj,
303
303
struct device * dev = kobj_to_dev (kobj );
304
304
struct nvmem_device * nvmem = to_nvmem_device (dev );
305
305
306
- attr -> size = nvmem -> size ;
307
-
308
306
return nvmem_bin_attr_get_umode (nvmem );
309
307
}
310
308
309
+ static size_t nvmem_bin_attr_size (struct kobject * kobj ,
310
+ const struct bin_attribute * attr ,
311
+ int i )
312
+ {
313
+ struct device * dev = kobj_to_dev (kobj );
314
+ struct nvmem_device * nvmem = to_nvmem_device (dev );
315
+
316
+ return nvmem -> size ;
317
+ }
318
+
311
319
static umode_t nvmem_attr_is_visible (struct kobject * kobj ,
312
320
struct attribute * attr , int i )
313
321
{
@@ -383,6 +391,7 @@ static const struct attribute_group nvmem_bin_group = {
383
391
.bin_attrs = nvmem_bin_attributes ,
384
392
.attrs = nvmem_attrs ,
385
393
.is_bin_visible = nvmem_bin_attr_is_visible ,
394
+ .bin_size = nvmem_bin_attr_size ,
386
395
.is_visible = nvmem_attr_is_visible ,
387
396
};
388
397
You can’t perform that action at this time.
0 commit comments