Thread (52 messages) 52 messages, 7 authors, 2012-06-11
STALE5121d

[PATCH 6.2/7] MMC: mmci: Enable Device Tree support for ux500

From: Lee Jones <hidden>
Date: 2012-06-11 10:03:26
Subsystem: arm primecell mmci pl180/1 driver, multimedia card (mmc), secure digital (sd) and sdio subsystem, the rest · Maintainers: Russell King, Ulf Hansson, Linus Torvalds

Lee can you provide an incremental fixup that makes the current
code textually equivalent to what Russell ACKed (devm_kzalloc()),
and funnel to Chris for the -rc:s ASAP?
Your wish is my command:

From: Lee Jones <redacted>
Date: Mon, 11 Jun 2012 10:41:00 +0100
Subject: [PATCH] mmc: mmci: Allocate platform memory during Device Tree boot

When booting with Device Tree enabled, platform specific information
is gathered by parsing the DT binary. Platform data is subsequently
populated with the result. The memory required for this is not
automatically allocated during Device Tree boot, so we'll do it here
instead.

Signed-off-by: Lee Jones <redacted>
---
 drivers/mmc/host/mmci.c |    6 ++++++
 1 file changed, 6 insertions(+)
diff --git a/drivers/mmc/host/mmci.c b/drivers/mmc/host/mmci.c
index f0fcce4..0045ee0 100644
--- a/drivers/mmc/host/mmci.c
+++ b/drivers/mmc/host/mmci.c
@@ -1276,6 +1276,12 @@ static int __devinit mmci_probe(struct amba_device *dev,
 		return -EINVAL;
 	}
 
+	if (!plat) {
+		plat = devm_kzalloc(&dev->dev, sizeof(*plat), GFP_KERNEL);
+		if (!plat)
+			return -ENOMEM;
+	}
+
 	if (np)
 		mmci_dt_populate_generic_pdata(np, plat);
 
-- 
1.7.9.5
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help