nvme: get rid of nvme_ctrl_list
authorChristoph Hellwig <hch@lst.de>
Wed, 18 Oct 2017 14:59:25 +0000 (16:59 +0200)
committerChristoph Hellwig <hch@lst.de>
Fri, 27 Oct 2017 06:04:53 +0000 (09:04 +0300)
commita6a5149b10ec8ab8b4a9479a8230265c1b573be0
treef74540e430551545883b7e452aa946d6617c180c
parentd22524a4782a943bb02a9cf6885ac470210aabfc
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>
drivers/nvme/host/core.c
drivers/nvme/host/nvme.h