* [PATCH] nvme: fix drvdata setup for the nvme device
@ 2016-02-08 18:07 Christoph Hellwig
2016-02-08 18:23 ` Jon Derrick
2016-02-09 19:44 ` Jens Axboe
0 siblings, 2 replies; 3+ messages in thread
From: Christoph Hellwig @ 2016-02-08 18:07 UTC (permalink / raw)
See http://www.infradead.org/rpr.html
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 at lst.de>
---
drivers/nvme/host/core.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/nvme/host/core.c b/drivers/nvme/host/core.c
index c5bf001..c326931 100644
--- 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);
--
2.1.4
^ permalink raw reply related [flat|nested] 3+ messages in thread
* [PATCH] nvme: fix drvdata setup for the nvme device
2016-02-08 18:07 [PATCH] nvme: fix drvdata setup for the nvme device Christoph Hellwig
@ 2016-02-08 18:23 ` Jon Derrick
2016-02-09 19:44 ` Jens Axboe
1 sibling, 0 replies; 3+ messages in thread
From: Jon Derrick @ 2016-02-08 18:23 UTC (permalink / raw)
I noticed this one too when I was perparing the last round of CMB patches
Looks good,
Reviewed-by: Jon Derrick <jonathan.derrick at intel.com>
^ permalink raw reply [flat|nested] 3+ messages in thread
* [PATCH] nvme: fix drvdata setup for the nvme device
2016-02-08 18:07 [PATCH] nvme: fix drvdata setup for the nvme device Christoph Hellwig
2016-02-08 18:23 ` Jon Derrick
@ 2016-02-09 19:44 ` Jens Axboe
1 sibling, 0 replies; 3+ messages in thread
From: Jens Axboe @ 2016-02-09 19:44 UTC (permalink / raw)
On 02/08/2016 11:07 AM, Christoph Hellwig wrote:
> Pass the right private data to device_create_with_groups from the
> beginning, and remove the superflous call to dev_set_drvdata.
Added for 4.6.
--
Jens Axboe
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2016-02-09 19:44 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-02-08 18:07 [PATCH] nvme: fix drvdata setup for the nvme device Christoph Hellwig
2016-02-08 18:23 ` Jon Derrick
2016-02-09 19:44 ` Jens Axboe
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.