Re: [PATCH] mci: omap: Fix default value of mci.f_max

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Am 27.09.2013 15:45, schrieb Alexander Aring:
On Fri, Sep 27, 2013 at 03:40:38PM +0200, Alexander Aring wrote:
Hi,

On Fri, Sep 27, 2013 at 03:38:07PM +0200, Jean-Christophe PLAGNIOL-VILLARD wrote:
On 14:13 Fri 27 Sep     , Teresa G??mez wrote:
Set default value of mci.f_max even when no pdata
is available.

Signed-off-by: Teresa Gámez <t.gamez@xxxxxxxxx>
---
  drivers/mci/omap_hsmmc.c |    4 ++--
  1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/mci/omap_hsmmc.c b/drivers/mci/omap_hsmmc.c
index a2cd3fe..f63697f 100644
--- a/drivers/mci/omap_hsmmc.c
+++ b/drivers/mci/omap_hsmmc.c
@@ -614,11 +614,11 @@ static int omap_mmc_probe(struct device_d *dev)
  	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;
+	} else {
+		hsmmc->mci.f_max = 52000000;
  	}
so do this

	if (!hsmmc->mci.f_maix)
		hsmmc->mci.f_max = 52000000;
perfect :-)

oh no, it isn't perfect s/f_maix/f_max/ ;)

- Alex

I just rewrote the patch doing this :

        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;

I'm not shure which is the better way now :).

Regards,
Teresa


_______________________________________________
barebox mailing list
barebox@xxxxxxxxxxxxxxxxxxx
http://lists.infradead.org/mailman/listinfo/barebox





[Index of Archives]     [Linux Embedded]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux