From: javier@javigon.com
To: linux-nvme@lists.infradead.org
Cc: linux-block@vger.kernel.org, hch@lst.de, kbusch@kernel.org,
sagi@grimberg.me, "Javier González" <javier.gonz@samsung.com>
Subject: [PATCH 2/4] nvme: rename controller base dev_t char device
Date: Tue, 1 Dec 2020 13:56:08 +0100 [thread overview]
Message-ID: <20201201125610.17138-3-javier.gonz@samsung.com> (raw)
In-Reply-To: <20201201125610.17138-1-javier.gonz@samsung.com>
From: Javier González <javier.gonz@samsung.com>
Rename controller base dev_t char device in preparation for adding a
namespace char device.
Signed-off-by: Javier González <javier.gonz@samsung.com>
---
drivers/nvme/host/core.c | 12 +++++++-----
1 file changed, 7 insertions(+), 5 deletions(-)
diff --git a/drivers/nvme/host/core.c b/drivers/nvme/host/core.c
index a965a8d28ba0..c23c891a8fb8 100644
--- a/drivers/nvme/host/core.c
+++ b/drivers/nvme/host/core.c
@@ -85,7 +85,7 @@ static LIST_HEAD(nvme_subsystems);
static DEFINE_MUTEX(nvme_subsystems_lock);
static DEFINE_IDA(nvme_instance_ida);
-static dev_t nvme_chr_devt;
+static dev_t nvme_ctrl_base_chr_devt;
static struct class *nvme_class;
static struct class *nvme_subsys_class;
@@ -4470,7 +4470,8 @@ int nvme_init_ctrl(struct nvme_ctrl *ctrl, struct device *dev,
device_initialize(&ctrl->ctrl_device);
ctrl->device = &ctrl->ctrl_device;
- ctrl->device->devt = MKDEV(MAJOR(nvme_chr_devt), ctrl->instance);
+ ctrl->device->devt = MKDEV(MAJOR(nvme_ctrl_base_chr_devt),
+ ctrl->instance);
ctrl->device->class = nvme_class;
ctrl->device->parent = ctrl->dev;
ctrl->device->groups = nvme_dev_attr_groups;
@@ -4679,7 +4680,8 @@ static int __init nvme_core_init(void)
if (!nvme_delete_wq)
goto destroy_reset_wq;
- result = alloc_chrdev_region(&nvme_chr_devt, 0, NVME_MINORS, "nvme");
+ result = alloc_chrdev_region(&nvme_ctrl_base_chr_devt, 0,
+ NVME_MINORS, "nvme");
if (result < 0)
goto destroy_delete_wq;
@@ -4700,7 +4702,7 @@ static int __init nvme_core_init(void)
destroy_class:
class_destroy(nvme_class);
unregister_chrdev:
- unregister_chrdev_region(nvme_chr_devt, NVME_MINORS);
+ unregister_chrdev_region(nvme_ctrl_base_chr_devt, NVME_MINORS);
destroy_delete_wq:
destroy_workqueue(nvme_delete_wq);
destroy_reset_wq:
@@ -4715,7 +4717,7 @@ static void __exit nvme_core_exit(void)
{
class_destroy(nvme_subsys_class);
class_destroy(nvme_class);
- unregister_chrdev_region(nvme_chr_devt, NVME_MINORS);
+ unregister_chrdev_region(nvme_ctrl_base_chr_devt, NVME_MINORS);
destroy_workqueue(nvme_delete_wq);
destroy_workqueue(nvme_reset_wq);
destroy_workqueue(nvme_wq);
--
2.17.1
next prev parent reply other threads:[~2020-12-01 12:57 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-12-01 12:56 [PATCH 0/4] nvme: enable per-namespace char device javier
2020-12-01 12:56 ` [PATCH 1/4] nvme: remove unnecessary return values javier
2020-12-01 14:04 ` Minwoo Im
2020-12-01 12:56 ` javier [this message]
2020-12-01 14:05 ` [PATCH 2/4] nvme: rename controller base dev_t char device Minwoo Im
2020-12-01 12:56 ` [PATCH 3/4] nvme: rename bdev operations javier
2020-12-01 14:06 ` Minwoo Im
2020-12-01 12:56 ` [PATCH 4/4] nvme: enable char device per namespace javier
2020-12-01 14:03 ` Minwoo Im
2020-12-01 18:57 ` Javier González
2020-12-01 19:30 ` Keith Busch
2020-12-01 19:38 ` Christoph Hellwig
2020-12-01 20:44 ` Javier González
2020-12-07 14:06 ` Christoph Hellwig
2020-12-02 3:00 ` Minwoo Im
2020-12-01 19:35 ` [PATCH 0/4] nvme: enable per-namespace char device Christoph Hellwig
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20201201125610.17138-3-javier.gonz@samsung.com \
--to=javier@javigon.com \
--cc=hch@lst.de \
--cc=javier.gonz@samsung.com \
--cc=kbusch@kernel.org \
--cc=linux-block@vger.kernel.org \
--cc=linux-nvme@lists.infradead.org \
--cc=sagi@grimberg.me \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox