diff options
author | Jens Axboe <axboe@fb.com> | 2016-07-09 01:04:11 +0300 |
---|---|---|
committer | Jens Axboe <axboe@fb.com> | 2016-07-09 01:04:11 +0300 |
commit | 41d512e51b5e59ee2598f74249799dcc6b0a06f2 (patch) | |
tree | 643954473c2893accfd6f45e7ea9e608023c1c51 /drivers/nvdimm/pmem.c | |
parent | 7110230719602852481c2793d054f866b2bf4a2b (diff) | |
parent | 52c44d93c26f5a76068c0a8cc83bb8f56f38043d (diff) | |
download | linux-41d512e51b5e59ee2598f74249799dcc6b0a06f2.tar.xz |
Merge branch 'for-4.8/block' of git://git.kernel.org/pub/scm/linux/kernel/git/nvdimm/nvdimm into for-4.8/drivers
Dan writes:
"The removal of ->driverfs_dev in favor of just passing the parent
device in as a parameter to add_disk(). See below, it has received a
"Reviewed-by" from Christoph, Bart, and Johannes.
It is also a pre-requisite for Fam Zheng's work to cleanup gendisk
uevents vs attribute visibility [1]. We would extend device_add_disk()
to take an attribute_group list.
This is based off a branch of block.git/for-4.8/drivers and has
received a positive build success notification from the kbuild robot
across several configs.
[1]: "gendisk: Generate uevent after attribute available"
http://marc.info/?l=linux-virtualization&m=146725201522201&w=2"
Diffstat (limited to 'drivers/nvdimm/pmem.c')
-rw-r--r-- | drivers/nvdimm/pmem.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/nvdimm/pmem.c b/drivers/nvdimm/pmem.c index 608fc4464574..066e07d9330f 100644 --- a/drivers/nvdimm/pmem.c +++ b/drivers/nvdimm/pmem.c @@ -297,14 +297,13 @@ static int pmem_attach_disk(struct device *dev, disk->queue = q; disk->flags = GENHD_FL_EXT_DEVT; nvdimm_namespace_disk_name(ndns, disk->disk_name); - disk->driverfs_dev = dev; set_capacity(disk, (pmem->size - pmem->pfn_pad - pmem->data_offset) / 512); if (devm_init_badblocks(dev, &pmem->bb)) return -ENOMEM; nvdimm_badblocks_populate(to_nd_region(dev->parent), &pmem->bb, res); disk->bb = &pmem->bb; - add_disk(disk); + device_add_disk(dev, disk); revalidate_disk(disk); return 0; |