From 01971f65ff88e3ebe2b6ae42b95d68e26b83718d Mon Sep 17 00:00:00 2001 From: David Brownell Date: Mon, 23 Mar 2009 18:23:47 -0700 Subject: ARM: OMAP3: mmc-twl4030 init passes device nodes back, v2 When setting up HSMMC devices, pass the device nodes back so board code can linking them to their power supply regulators. Signed-off-by: David Brownell Signed-off-by: Tony Lindgren --- arch/arm/plat-omap/devices.c | 3 +++ arch/arm/plat-omap/include/mach/mmc.h | 2 ++ 2 files changed, 5 insertions(+) (limited to 'arch/arm/plat-omap') diff --git a/arch/arm/plat-omap/devices.c b/arch/arm/plat-omap/devices.c index 208dbb121f4..87fb7ff4179 100644 --- a/arch/arm/plat-omap/devices.c +++ b/arch/arm/plat-omap/devices.c @@ -228,6 +228,9 @@ int __init omap_mmc_add(const char *name, int id, unsigned long base, ret = platform_device_add(pdev); if (ret) goto fail; + + /* return device handle to board setup code */ + data->dev = &pdev->dev; return 0; fail: diff --git a/arch/arm/plat-omap/include/mach/mmc.h b/arch/arm/plat-omap/include/mach/mmc.h index 73a9e15031b..4435bd434e1 100644 --- a/arch/arm/plat-omap/include/mach/mmc.h +++ b/arch/arm/plat-omap/include/mach/mmc.h @@ -37,6 +37,8 @@ #define OMAP_MMC_MAX_SLOTS 2 struct omap_mmc_platform_data { + /* back-link to device */ + struct device *dev; /* number of slots per controller */ unsigned nr_slots:2; -- cgit v1.2.3