Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 1db5eebf authored by Lars-Peter Clausen's avatar Lars-Peter Clausen Committed by Chris Ball
Browse files

mmc: sdhci_pltfm: Constify sdhci_pltfm_data



The sdhci_pltfm_data struct is never modified within the sdhci_pltfm
module. So make the pdata parameter to sdhci_pltfm_init and
sdhci_pltfm_register const.  This allows drivers to declare their
sdhci_pltfm_data struct as const.

This patch also makes the sdhci_pltfm_data declarations const where
possible.

Signed-off-by: default avatarLars-Peter Clausen <lars@metafoo.de>
Acked-by: default avatarShawn Guo <shawn.guo@linaro.org>
Signed-off-by: default avatarChris Ball <cjb@laptop.org>
parent 91cf54fe
Loading
Loading
Loading
Loading
+1 −1
Original line number Original line Diff line number Diff line
@@ -135,7 +135,7 @@ static struct sdhci_ops bcm2835_sdhci_ops = {
	.get_min_clock = bcm2835_sdhci_get_min_clock,
	.get_min_clock = bcm2835_sdhci_get_min_clock,
};
};


static struct sdhci_pltfm_data bcm2835_sdhci_pdata = {
static const struct sdhci_pltfm_data bcm2835_sdhci_pdata = {
	.quirks = SDHCI_QUIRK_BROKEN_CARD_DETECTION |
	.quirks = SDHCI_QUIRK_BROKEN_CARD_DETECTION |
		  SDHCI_QUIRK_DATA_TIMEOUT_USES_SDCLK,
		  SDHCI_QUIRK_DATA_TIMEOUT_USES_SDCLK,
	.ops = &bcm2835_sdhci_ops,
	.ops = &bcm2835_sdhci_ops,
+1 −1
Original line number Original line Diff line number Diff line
@@ -85,7 +85,7 @@ static struct sdhci_ops sdhci_cns3xxx_ops = {
	.set_clock	= sdhci_cns3xxx_set_clock,
	.set_clock	= sdhci_cns3xxx_set_clock,
};
};


static struct sdhci_pltfm_data sdhci_cns3xxx_pdata = {
static const struct sdhci_pltfm_data sdhci_cns3xxx_pdata = {
	.ops = &sdhci_cns3xxx_ops,
	.ops = &sdhci_cns3xxx_ops,
	.quirks = SDHCI_QUIRK_BROKEN_DMA |
	.quirks = SDHCI_QUIRK_BROKEN_DMA |
		  SDHCI_QUIRK_DATA_TIMEOUT_USES_SDCLK |
		  SDHCI_QUIRK_DATA_TIMEOUT_USES_SDCLK |
+1 −1
Original line number Original line Diff line number Diff line
@@ -88,7 +88,7 @@ static struct sdhci_ops sdhci_dove_ops = {
	.read_l	= sdhci_dove_readl,
	.read_l	= sdhci_dove_readl,
};
};


static struct sdhci_pltfm_data sdhci_dove_pdata = {
static const struct sdhci_pltfm_data sdhci_dove_pdata = {
	.ops	= &sdhci_dove_ops,
	.ops	= &sdhci_dove_ops,
	.quirks	= SDHCI_QUIRK_NO_SIMULT_VDD_AND_POWER |
	.quirks	= SDHCI_QUIRK_NO_SIMULT_VDD_AND_POWER |
		  SDHCI_QUIRK_NO_BUSY_IRQ |
		  SDHCI_QUIRK_NO_BUSY_IRQ |
+1 −1
Original line number Original line Diff line number Diff line
@@ -412,7 +412,7 @@ static struct sdhci_ops sdhci_esdhc_ops = {
	.platform_bus_width = esdhc_pltfm_bus_width,
	.platform_bus_width = esdhc_pltfm_bus_width,
};
};


static struct sdhci_pltfm_data sdhci_esdhc_imx_pdata = {
static const struct sdhci_pltfm_data sdhci_esdhc_imx_pdata = {
	.quirks = ESDHC_DEFAULT_QUIRKS | SDHCI_QUIRK_NO_HISPD_BIT
	.quirks = ESDHC_DEFAULT_QUIRKS | SDHCI_QUIRK_NO_HISPD_BIT
			| SDHCI_QUIRK_NO_ENDATTR_IN_NOPDESC
			| SDHCI_QUIRK_NO_ENDATTR_IN_NOPDESC
			| SDHCI_QUIRK_BROKEN_ADMA_ZEROLEN_DESC
			| SDHCI_QUIRK_BROKEN_ADMA_ZEROLEN_DESC
+1 −1
Original line number Original line Diff line number Diff line
@@ -249,7 +249,7 @@ static struct sdhci_ops sdhci_esdhc_ops = {
	.adma_workaround = esdhci_of_adma_workaround,
	.adma_workaround = esdhci_of_adma_workaround,
};
};


static struct sdhci_pltfm_data sdhci_esdhc_pdata = {
static const struct sdhci_pltfm_data sdhci_esdhc_pdata = {
	/*
	/*
	 * card detection could be handled via GPIO
	 * card detection could be handled via GPIO
	 * eSDHC cannot support End Attribute in NOP ADMA descriptor
	 * eSDHC cannot support End Attribute in NOP ADMA descriptor
Loading