]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - arch/arm/plat-omap/devices.c
Merge current mainline tree into linux-omap tree
[linux-2.6-omap-h63xx.git] / arch / arm / plat-omap / devices.c
index ac15c23fd5da840e5816e6223b3456d60b24c0c6..6b742a8ee4e53be2125c75ac231cd2840f9f9ca1 100644 (file)
 #include <linux/init.h>
 #include <linux/platform_device.h>
 #include <linux/io.h>
+#include <linux/i2c/menelaus.h>
 
 #include <mach/hardware.h>
 #include <asm/mach-types.h>
 #include <asm/mach/map.h>
 
 #include <mach/tc.h>
-#include <mach/control.h>
 #include <mach/board.h>
 #include <mach/mmc.h>
 #include <mach/mux.h>
 #include <mach/gpio.h>
-#include <mach/menelaus.h>
-#include <mach/mcbsp.h>
 #include <mach/dsp_common.h>
+#include <mach/mcbsp.h>
 
 #if    defined(CONFIG_OMAP_DSP) || defined(CONFIG_OMAP_DSP_MODULE)
 
@@ -200,14 +199,15 @@ void omap_mcbsp_register_board_cfg(struct omap_mcbsp_platform_data *config,
 /*
  * Register MMC devices. Called from mach-omap1 and mach-omap2 device init.
  */
-int __init omap_mmc_add(int id, unsigned long base, unsigned long size,
-               unsigned int irq, struct omap_mmc_platform_data *data)
+int __init omap_mmc_add(const char *name, int id, unsigned long base,
+                               unsigned long size, unsigned int irq,
+                               struct omap_mmc_platform_data *data)
 {
        struct platform_device *pdev;
        struct resource res[OMAP_MMC_NR_RES];
        int ret;
 
-       pdev = platform_device_alloc("mmci-omap", id);
+       pdev = platform_device_alloc(name, id);
        if (!pdev)
                return -ENOMEM;
 
@@ -227,6 +227,9 @@ int __init omap_mmc_add(int id, unsigned long base, unsigned long size,
        ret = platform_device_add(pdev);
        if (ret)
                goto fail;
+
+       /* return device handle to board setup code */
+       data->dev = &pdev->dev;
        return 0;
 
 fail: