Skip to contentSkip to conversation

mpc837xerdb: "fix Calling __hwconfig without a buffer" warning

PATCH In review Sinan Akman 2 participants 2 messages Jan 21, 2015 – Mar 2, 2015

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 mpc837xerdb: "fix Calling __hwconfig without a buffer" warning

---
 board/freescale/mpc837xerdb/mpc837xerdb.c |    7 ++++++-
 1 files changed, 6 insertions(+), 1 deletions(-)
board/freescale/mpc837xerdb/mpc837xerdb.c +6 -1
index e0a1031..565f815 100644
@@ -166,8 +166,13 @@ int board_early_init_f(void)
 int board_mmc_init(bd_t *bd)
 {
 	struct immap __iomem *im = (struct immap __iomem *)CONFIG_SYS_IMMR;
+	char buffer[HWCONFIG_BUFFER_SIZE] = {0};
+	int esdhc_hwconfig_enabled = 0;
 
-	if (!hwconfig("esdhc"))
+	if (getenv_f("hwconfig", buffer, sizeof(buffer)) > 0)
+		esdhc_hwconfig_enabled = hwconfig_f("esdhc", buffer);
+
+	if (esdhc_hwconfig_enabled == 0)
 		return 0;
 
 	clrsetbits_be32(&im->sysconf.sicrl, SICRL_USB_B, SICRL_USB_B_SD);
Signature · 1 line
1.7.6.5
#1 lore raw
Quoted 1 line · Sinan Akman

Applied to u-boot/master, thanks!

Signature · 8 lines
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20150302/14c240a7/attachment.sig>