summaryrefslogtreecommitdiffstats
path: root/drivers/nvme
diff options
context:
space:
mode:
authorJens Axboe <axboe@fb.com>2016-07-09 00:04:11 +0200
committerJens Axboe <axboe@fb.com>2016-07-09 00:04:11 +0200
commit41d512e51b5e59ee2598f74249799dcc6b0a06f2 (patch)
tree643954473c2893accfd6f45e7ea9e608023c1c51 /drivers/nvme
parentnvme-rdma: add a NVMe over Fabrics RDMA host driver (diff)
parentblock: remove ->driverfs_dev (diff)
downloadlinux-41d512e51b5e59ee2598f74249799dcc6b0a06f2.tar.xz
linux-41d512e51b5e59ee2598f74249799dcc6b0a06f2.zip
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/nvme')
-rw-r--r--drivers/nvme/host/core.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/nvme/host/core.c b/drivers/nvme/host/core.c
index 4babdf0d895c..500b790442c9 100644
--- a/drivers/nvme/host/core.c
+++ b/drivers/nvme/host/core.c
@@ -1665,7 +1665,6 @@ static void nvme_alloc_ns(struct nvme_ctrl *ctrl, unsigned nsid)
disk->fops = &nvme_fops;
disk->private_data = ns;
disk->queue = ns->queue;
- disk->driverfs_dev = ctrl->device;
disk->flags = GENHD_FL_EXT_DEVT;
sprintf(disk->disk_name, "nvme%dn%d", ctrl->instance, ns->instance);
@@ -1677,7 +1676,7 @@ static void nvme_alloc_ns(struct nvme_ctrl *ctrl, unsigned nsid)
if (ns->type == NVME_NS_LIGHTNVM)
return;
- add_disk(ns->disk);
+ device_add_disk(ctrl->device, ns->disk);
if (sysfs_create_group(&disk_to_dev(ns->disk)->kobj,
&nvme_ns_attr_group))
pr_warn("%s: failed to create sysfs group for identification\n",