NVMe: Move sysfs entries to the right place
authorMatthew Wilcox <matthew.r.wilcox@intel.com>
Tue, 1 Feb 2011 17:49:38 +0000 (12:49 -0500)
committerMatthew Wilcox <matthew.r.wilcox@intel.com>
Fri, 4 Nov 2011 19:52:54 +0000 (15:52 -0400)
Because I wasn't setting driverfs_dev, the devices were showing up under
/sys/devices/virtual/block.  Now they appear underneath the PCI device
which they belong to.

Signed-off-by: Matthew Wilcox <matthew.r.wilcox@intel.com>
drivers/block/nvme.c

index e3d921577b949df33d9cdf8f2c326ef67f5b78b8..744db3877c42b9d9db3b4993ae1a06b8e715bdd1 100644 (file)
@@ -889,6 +889,7 @@ static struct nvme_ns *nvme_alloc_ns(struct nvme_dev *dev, int index,
        disk->fops = &nvme_fops;
        disk->private_data = ns;
        disk->queue = ns->queue;
+       disk->driverfs_dev = &dev->pci_dev->dev;
        sprintf(disk->disk_name, "nvme%dn%d", dev->instance, index);
        set_capacity(disk, le64_to_cpup(&id->nsze) << (ns->lba_shift - 9));