lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Date:	Thu, 18 Jun 2015 12:57:07 +0530
From:	Suneel Garapati <suneel.garapati@...inx.com>
To:	<linux-mmc@...r.kernel.org>, <linux-kernel@...r.kernel.org>
CC:	Ulf Hansson <ulf.hansson@...aro.org>, <michals@...inx.com>,
	<sorenb@...inx.com>, Adrian Hunter <adrian.hunter@...el.com>,
	Aisheng Dong <b29396@...escale.com>,
	Haibo Chen <haibo.chen@...escale.com>,
	Tim Kryger <tim.kryger@...il.com>,
	Shawn Guo <shawn.guo@...aro.org>, Yi Sun <yi.y.sun@...el.com>,
	"Rafael J. Wysocki" <rafael.j.wysocki@...el.com>,
	<stripathi@....com>, Suneel Garapati <suneel.garapati@...inx.com>
Subject: [PATCH] drivers: mmc: sdhci: update max frequency only if undefined

f_max parameter of mmc structure is updated unconditionally.
If dt property max-frequency is assigned, this update is
overwriting the dt property value which is undesired.

Signed-off-by: Suneel Garapati <suneel.garapati@...inx.com>
---
 drivers/mmc/host/sdhci.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/drivers/mmc/host/sdhci.c b/drivers/mmc/host/sdhci.c
index bc14452..c2917d5 100644
--- a/drivers/mmc/host/sdhci.c
+++ b/drivers/mmc/host/sdhci.c
@@ -3047,7 +3047,10 @@ int sdhci_add_host(struct sdhci_host *host)
	 * Set host parameters.
	 */
	mmc->ops = &sdhci_ops;
-	mmc->f_max = host->max_clk;
+
+	if(!mmc->f_max)
+		mmc->f_max = host->max_clk;
+
	if (host->ops->get_min_clock)
		mmc->f_min = host->ops->get_min_clock(host);
	else if (host->version >= SDHCI_SPEC_300) {
--
2.1.2
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ