projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
949928c
)
nvme: fix drvdata setup for the nvme device
author
Christoph Hellwig
<hch@lst.de>
Tue, 9 Feb 2016 19:44:03 +0000
(12:44 -0700)
committer
Jens Axboe
<axboe@fb.com>
Tue, 9 Feb 2016 19:44:03 +0000
(12:44 -0700)
Pass the right private data to device_create_with_groups from the
beginning, and remove the superflous call to dev_set_drvdata.
Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Jon Derrick <jonathan.derrick@intel.com>
Signed-off-by: Jens Axboe <axboe@fb.com>
drivers/nvme/host/core.c
patch
|
blob
|
history
diff --git
a/drivers/nvme/host/core.c
b/drivers/nvme/host/core.c
index c5bf001af55954e2c9275d34c65cbb5dfa2a037d..c326931d9b4d2123e663d1ded5c411694b425e7b 100644
(file)
--- a/
drivers/nvme/host/core.c
+++ b/
drivers/nvme/host/core.c
@@
-1383,14
+1383,13
@@
int nvme_init_ctrl(struct nvme_ctrl *ctrl, struct device *dev,
ctrl->device = device_create_with_groups(nvme_class, ctrl->dev,
MKDEV(nvme_char_major, ctrl->instance),
-
dev
, nvme_dev_attr_groups,
+
ctrl
, nvme_dev_attr_groups,
"nvme%d", ctrl->instance);
if (IS_ERR(ctrl->device)) {
ret = PTR_ERR(ctrl->device);
goto out_release_instance;
}
get_device(ctrl->device);
- dev_set_drvdata(ctrl->device, ctrl);
spin_lock(&dev_list_lock);
list_add_tail(&ctrl->node, &nvme_ctrl_list);