Skip to contentSkip to conversation

mci: omap: Fix default value of mci.f_max

PATCH Applied Teresa Gámez 2 participants 2 messages Oct 2, 2013

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 mci: omap: Fix default value of mci.f_max

With commit c2ef47887 mci.f_max default value is
only set when pdata is available.

Fix this with always setting the mci.f_max default value and overrite it when pdata available.

---
changes in v2:
- set default value always and overwrite it when pdata available
- updated commit message

 drivers/mci/omap_hsmmc.c |    4 +---
 1 files changed, 1 insertions(+), 3 deletions(-)
drivers/mci/omap_hsmmc.c +1 -3
index a2cd3fe..19db461 100644
@@ -609,19 +609,17 @@ static int omap_mmc_probe(struct device_d *dev)
 	hsmmc->mci.voltages = MMC_VDD_32_33 | MMC_VDD_33_34;
 
 	hsmmc->mci.f_min = 400000;
+	hsmmc->mci.f_max = 52000000;
 
 	pdata = (struct omap_hsmmc_platform_data *)dev->platform_data;
 	if (pdata) {
 		if (pdata->f_max)
 			hsmmc->mci.f_max = pdata->f_max;
-		else
-			hsmmc->mci.f_max = 52000000;
 
 		if (pdata->devname)
 			hsmmc->mci.devname = pdata->devname;
 	}
 
-
 	dev->priv = hsmmc;
 	dev->detect = omap_mmc_detect,
 
Signature · 7 lines
1.7.0.4


_______________________________________________
barebox mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/barebox
Applied
#1 lore raw
Quoted 7 lines · Teresa Gámez

With commit c2ef47887 mci.f_max default value is
only set when pdata is available.

Fix this with always setting the mci.f_max default value and overrite it when pdata available.

Applied, thanks

Sascha

Quoted 41 lines

---
changes in v2:
- set default value always and overwrite it when pdata available
- updated commit message

 drivers/mci/omap_hsmmc.c |    4 +---
 1 files changed, 1 insertions(+), 3 deletions(-)
drivers/mci/omap_hsmmc.c +1 -3
index a2cd3fe..19db461 100644
@@ -609,19 +609,17 @@ static int omap_mmc_probe(struct device_d *dev)
 	hsmmc->mci.voltages = MMC_VDD_32_33 | MMC_VDD_33_34;
 
 	hsmmc->mci.f_min = 400000;
+	hsmmc->mci.f_max = 52000000;
 
 	pdata = (struct omap_hsmmc_platform_data *)dev->platform_data;
 	if (pdata) {
 		if (pdata->f_max)
 			hsmmc->mci.f_max = pdata->f_max;
-		else
-			hsmmc->mci.f_max = 52000000;
 
 		if (pdata->devname)
 			hsmmc->mci.devname = pdata->devname;
 	}
 
-
 	dev->priv = hsmmc;
 	dev->detect = omap_mmc_detect,
 
Signature · 7 lines
1.7.0.4


_______________________________________________
barebox mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/barebox
Signature · 9 lines
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

_______________________________________________
barebox mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/barebox