We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f060db9 commit d55174cCopy full SHA for d55174c
drivers/nvdimm/pmem.c
@@ -380,7 +380,6 @@ static int pmem_attach_disk(struct device *dev,
380
struct nd_pfn_sb *pfn_sb;
381
struct pmem_device *pmem;
382
struct request_queue *q;
383
- struct device *gendev;
384
struct gendisk *disk;
385
void *addr;
386
int rc;
@@ -489,10 +488,8 @@ static int pmem_attach_disk(struct device *dev,
489
488
}
490
dax_write_cache(dax_dev, nvdimm_has_cache(nd_region));
491
pmem->dax_dev = dax_dev;
492
- gendev = disk_to_dev(disk);
493
- gendev->groups = pmem_attribute_groups;
494
495
- device_add_disk(dev, disk, NULL);
+ device_add_disk(dev, disk, pmem_attribute_groups);
496
if (devm_add_action_or_reset(dev, pmem_release_disk, pmem))
497
return -ENOMEM;
498
0 commit comments