diff options
author | Christoph Hellwig <hch@lst.de> | 2017-10-18 16:59:25 +0200 |
---|---|---|
committer | Christoph Hellwig <hch@lst.de> | 2017-10-27 09:04:53 +0300 |
commit | a6a5149b10ec8ab8b4a9479a8230265c1b573be0 (patch) | |
tree | f74540e430551545883b7e452aa946d6617c180c /drivers/nvme/host/nvme.h | |
parent | d22524a4782a943bb02a9cf6885ac470210aabfc (diff) | |
download | linux-a6a5149b10ec8ab8b4a9479a8230265c1b573be0.tar.bz2 |
nvme: get rid of nvme_ctrl_list
Use the core chrdev code to set up the link between the character device
and the nvme controller. This allows us to get rid of the global list
of all controllers, and also ensures that we have both a reference to
the controller and the transport module before the open method of the
character device is called.
Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Sagi Grimberg <sgi@grimberg.me>
Reviewed-by: Johannes Thumshirn <jthumshirn@suse.de>
Reviewed-by: Hannes Reinecke <hare@suse.com>
Diffstat (limited to 'drivers/nvme/host/nvme.h')
-rw-r--r-- | drivers/nvme/host/nvme.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/nvme/host/nvme.h b/drivers/nvme/host/nvme.h index ae60d8342e60..1bb2bc165e54 100644 --- a/drivers/nvme/host/nvme.h +++ b/drivers/nvme/host/nvme.h @@ -15,6 +15,7 @@ #define _NVME_H #include <linux/nvme.h> +#include <linux/cdev.h> #include <linux/pci.h> #include <linux/kref.h> #include <linux/blk-mq.h> @@ -134,7 +135,7 @@ struct nvme_ctrl { struct mutex namespaces_mutex; struct device ctrl_device; struct device *device; /* char device */ - struct list_head node; + struct cdev cdev; struct ida ns_ida; struct work_struct reset_work; |