block/sed-opal: allocate struct opal_dev dynamically
authorChristoph Hellwig <hch@lst.de>
Fri, 17 Feb 2017 12:59:39 +0000 (13:59 +0100)
committerJens Axboe <axboe@fb.com>
Fri, 17 Feb 2017 19:41:47 +0000 (12:41 -0700)
commit4f1244c8298606b8fae64b4d78b820ae6b896e3c
tree81fbf9080d730ca328572847be75fa4e05e4268e
parentf5b37b7c23915af93081a8711e0a0f0219063756
block/sed-opal: allocate struct opal_dev dynamically

Insted of bloating the containing structure with it all the time this
allocates struct opal_dev dynamically.  Additionally this allows moving
the definition of struct opal_dev into sed-opal.c.  For this a new
private data field is added to it that is passed to the send/receive
callback.  After that a lot of internals can be made private as well.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Tested-by: Scott Bauer <scott.bauer@intel.com>
Reviewed-by: Scott Bauer <scott.bauer@intel.com>
Signed-off-by: Jens Axboe <axboe@fb.com>
block/opal_proto.h
block/sed-opal.c
drivers/nvme/host/core.c
drivers/nvme/host/nvme.h
drivers/nvme/host/pci.c
include/linux/sed-opal.h