mmc: sdhci-sprd: Constify struct sdhci_ops
authorKrzysztof Kozlowski <krzk@kernel.org>
Sun, 14 Apr 2024 14:07:33 +0000 (16:07 +0200)
committerUlf Hansson <ulf.hansson@linaro.org>
Fri, 26 Apr 2024 04:47:04 +0000 (06:47 +0200)
The local struct sdhci_ops can be made const for code safety.

Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
Acked-by: Adrian Hunter <adrian.hunter@intel.com>
Reviewed-by: Baolin Wang <baolin.wang@linux.alibaba.com>
Link: https://lore.kernel.org/r/20240414-mmc-const-sdhci-ops-v2-3-262f81faadac@kernel.org
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
drivers/mmc/host/sdhci-sprd.c

index 685b1c6489018a4c2710b6f403cad9a9e6ec5d14..8776f42871196b9155696dc6b5bac33c8ff448a0 100644 (file)
@@ -439,7 +439,7 @@ static void sdhci_sprd_set_power(struct sdhci_host *host, unsigned char mode,
        }
 }
 
-static struct sdhci_ops sdhci_sprd_ops = {
+static const struct sdhci_ops sdhci_sprd_ops = {
        .read_l = sdhci_sprd_readl,
        .write_l = sdhci_sprd_writel,
        .write_w = sdhci_sprd_writew,