All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Ricardo B. Marliere" <ricardo@marliere.net>
To: Ulf Hansson <ulf.hansson@linaro.org>
Cc: linux-mmc@vger.kernel.org, linux-kernel@vger.kernel.org,
	 Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	 "Ricardo B. Marliere" <ricardo@marliere.net>
Subject: [PATCH 1/3] mmc: core: make mmc_rpmb_bus_type const
Date: Sat, 03 Feb 2024 16:02:00 -0300	[thread overview]
Message-ID: <20240203-bus_cleanup-mmc-v1-1-ad054dce8dc3@marliere.net> (raw)
In-Reply-To: <20240203-bus_cleanup-mmc-v1-0-ad054dce8dc3@marliere.net>

Now that the driver core can properly handle constant struct bus_type,
move the mmc_rpmb_bus_type variable to be a constant structure as well,
placing it into read-only memory which can not be modified at runtime.

Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Suggested-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Ricardo B. Marliere <ricardo@marliere.net>
---
 drivers/mmc/core/block.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/mmc/core/block.c b/drivers/mmc/core/block.c
index a9b60b91e32f..bd165cef2bbc 100644
--- a/drivers/mmc/core/block.c
+++ b/drivers/mmc/core/block.c
@@ -144,7 +144,7 @@ struct mmc_blk_data {
 static dev_t mmc_rpmb_devt;
 
 /* Bus type for RPMB character devices */
-static struct bus_type mmc_rpmb_bus_type = {
+static const struct bus_type mmc_rpmb_bus_type = {
 	.name = "mmc_rpmb",
 };
 

-- 
2.43.0


  reply	other threads:[~2024-02-03 19:01 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-02-03 19:01 [PATCH 0/3] drivers: mmc: struct bus_type cleanup Ricardo B. Marliere
2024-02-03 19:02 ` Ricardo B. Marliere [this message]
2024-02-03 19:02 ` [PATCH 2/3] mmc: core: make mmc_bus_type const Ricardo B. Marliere
2024-02-03 19:02 ` [PATCH 3/3] mmc: core: make sdio_bus_type const Ricardo B. Marliere
2024-02-03 21:23 ` [PATCH 0/3] drivers: mmc: struct bus_type cleanup Greg Kroah-Hartman
2024-02-05 17:28 ` Ulf Hansson

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=20240203-bus_cleanup-mmc-v1-1-ad054dce8dc3@marliere.net \
    --to=ricardo@marliere.net \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mmc@vger.kernel.org \
    --cc=ulf.hansson@linaro.org \
    /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 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.