All of lore.kernel.org
 help / color / mirror / Atom feed
From: Krzysztof Kozlowski <krzk@kernel.org>
To: Adrian Hunter <adrian.hunter@intel.com>,
	 Angelo Dureghello <adureghello@baylibre.com>,
	 Ulf Hansson <ulf.hansson@linaro.org>,
	Vignesh Raghavendra <vigneshr@ti.com>,
	 Orson Zhai <orsonzhai@gmail.com>,
	 Baolin Wang <baolin.wang@linux.alibaba.com>,
	 Chunyan Zhang <zhang.lyra@gmail.com>,
	Ben Dooks <ben-linux@fluff.org>,
	 Jaehoon Chung <jh80.chung@samsung.com>
Cc: linux-mmc@vger.kernel.org, linux-kernel@vger.kernel.org,
	 Krzysztof Kozlowski <krzk@kernel.org>
Subject: [PATCH v2 4/5] mmc: sdhci_am654: Constify struct sdhci_ops
Date: Sun, 14 Apr 2024 16:07:34 +0200	[thread overview]
Message-ID: <20240414-mmc-const-sdhci-ops-v2-4-262f81faadac@kernel.org> (raw)
In-Reply-To: <20240414-mmc-const-sdhci-ops-v2-0-262f81faadac@kernel.org>

The local struct sdhci_ops can be made const for code safety.

Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
---
 drivers/mmc/host/sdhci_am654.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/mmc/host/sdhci_am654.c b/drivers/mmc/host/sdhci_am654.c
index ba36123e4ccc..17ad32cfc0c3 100644
--- a/drivers/mmc/host/sdhci_am654.c
+++ b/drivers/mmc/host/sdhci_am654.c
@@ -543,7 +543,7 @@ static int sdhci_am654_platform_execute_tuning(struct sdhci_host *host,
 	return 0;
 }
 
-static struct sdhci_ops sdhci_am654_ops = {
+static const struct sdhci_ops sdhci_am654_ops = {
 	.platform_execute_tuning = sdhci_am654_platform_execute_tuning,
 	.get_max_clock = sdhci_pltfm_clk_get_max_clock,
 	.get_timeout_clock = sdhci_pltfm_clk_get_max_clock,
@@ -573,7 +573,7 @@ static const struct sdhci_am654_driver_data sdhci_am654_drvdata = {
 	.flags = IOMUX_PRESENT | FREQSEL_2_BIT | STRBSEL_4_BIT | DLL_PRESENT,
 };
 
-static struct sdhci_ops sdhci_j721e_8bit_ops = {
+static const struct sdhci_ops sdhci_j721e_8bit_ops = {
 	.platform_execute_tuning = sdhci_am654_platform_execute_tuning,
 	.get_max_clock = sdhci_pltfm_clk_get_max_clock,
 	.get_timeout_clock = sdhci_pltfm_clk_get_max_clock,
@@ -597,7 +597,7 @@ static const struct sdhci_am654_driver_data sdhci_j721e_8bit_drvdata = {
 	.flags = DLL_PRESENT | DLL_CALIB,
 };
 
-static struct sdhci_ops sdhci_j721e_4bit_ops = {
+static const struct sdhci_ops sdhci_j721e_4bit_ops = {
 	.platform_execute_tuning = sdhci_am654_platform_execute_tuning,
 	.get_max_clock = sdhci_pltfm_clk_get_max_clock,
 	.get_timeout_clock = sdhci_pltfm_clk_get_max_clock,

-- 
2.34.1


  parent reply	other threads:[~2024-04-14 14:08 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-04-14 14:07 [PATCH v2 0/5] mmc: Constify struct sdhci_ops Krzysztof Kozlowski
2024-04-14 14:07 ` [PATCH v2 1/5] mmc: sdhci-esdhc-mcf: " Krzysztof Kozlowski
2024-04-14 14:07 ` [PATCH v2 2/5] mmc: sdhci-omap: " Krzysztof Kozlowski
2024-04-14 14:07 ` [PATCH v2 3/5] mmc: sdhci-sprd: " Krzysztof Kozlowski
2024-04-15  1:45   ` Baolin Wang
2024-04-14 14:07 ` Krzysztof Kozlowski [this message]
2024-04-14 14:07 ` [PATCH v2 5/5] mmc: sdhci-s3c: Choose sdhci_ops based on variant Krzysztof Kozlowski
2024-04-15  6:07 ` [PATCH v2 0/5] mmc: Constify struct sdhci_ops Adrian Hunter
2024-04-25 16:21 ` 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=20240414-mmc-const-sdhci-ops-v2-4-262f81faadac@kernel.org \
    --to=krzk@kernel.org \
    --cc=adrian.hunter@intel.com \
    --cc=adureghello@baylibre.com \
    --cc=baolin.wang@linux.alibaba.com \
    --cc=ben-linux@fluff.org \
    --cc=jh80.chung@samsung.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mmc@vger.kernel.org \
    --cc=orsonzhai@gmail.com \
    --cc=ulf.hansson@linaro.org \
    --cc=vigneshr@ti.com \
    --cc=zhang.lyra@gmail.com \
    /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.