mmc: sdhci: constify sdhci_pltfm_data structures
authorJulia Lawall <Julia.Lawall@lip6.fr>
Mon, 7 Aug 2017 09:50:40 +0000 (11:50 +0200)
committerUlf Hansson <ulf.hansson@linaro.org>
Wed, 30 Aug 2017 12:01:51 +0000 (14:01 +0200)
The sdhci_pltfm_data structure is only passed as the second argument
of sdhci_pltfm_init, which is const, so the sdhci_pltfm_data structure can
be const as well.

Done with the help of Coccinelle.

Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
drivers/mmc/host/sdhci-pic32.c
drivers/mmc/host/sdhci-pxav3.c

index 72c13b6f05f977b5a5124867a713708a2a1bf44f..a6caa49ca25acb67e62ce7d23c435b70c9624349 100644 (file)
@@ -97,7 +97,7 @@ static const struct sdhci_ops pic32_sdhci_ops = {
        .get_ro = pic32_sdhci_get_ro,
 };
 
-static struct sdhci_pltfm_data sdhci_pic32_pdata = {
+static const struct sdhci_pltfm_data sdhci_pic32_pdata = {
        .ops = &pic32_sdhci_ops,
        .quirks = SDHCI_QUIRK_NO_HISPD_BIT,
        .quirks2 = SDHCI_QUIRK2_NO_1_8_V,
index f953f35c26247ff60584070c23a5f04473cffc6f..a34434166ca7bcf54d2a426b50bdd765de39c76b 100644 (file)
@@ -337,7 +337,7 @@ static const struct sdhci_ops pxav3_sdhci_ops = {
        .set_uhs_signaling = pxav3_set_uhs_signaling,
 };
 
-static struct sdhci_pltfm_data sdhci_pxav3_pdata = {
+static const struct sdhci_pltfm_data sdhci_pxav3_pdata = {
        .quirks = SDHCI_QUIRK_DATA_TIMEOUT_USES_SDCLK
                | SDHCI_QUIRK_NO_ENDATTR_IN_NOPDESC
                | SDHCI_QUIRK_32BIT_ADMA_SIZE