]> git.karo-electronics.de Git - mv-sheeva.git/blobdiff - drivers/mfd/tc6387xb.c
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc-2.6
[mv-sheeva.git] / drivers / mfd / tc6387xb.c
index 03718feda4d8f9300951ec304d785163eda56968..a22b21ac6cf83989c0329e7fbb62c45db51b7751 100644 (file)
 #include <linux/mfd/tmio.h>
 #include <linux/mfd/tc6387xb.h>
 
+enum {
+       TC6387XB_CELL_MMC,
+};
+
 #ifdef CONFIG_PM
 static int tc6387xb_suspend(struct platform_device *dev, pm_message_t state)
 {
@@ -87,7 +91,7 @@ static struct resource tc6387xb_mmc_resources[] = {
 };
 
 static struct mfd_cell tc6387xb_cells[] = {
-       {
+       [TC6387XB_CELL_MMC] = {
                .name = "tmio-mmc",
                .enable = tc6387xb_mmc_enable,
                .disable = tc6387xb_mmc_disable,
@@ -119,8 +123,13 @@ static int tc6387xb_probe(struct platform_device *dev)
 
        printk(KERN_INFO "Toshiba tc6387xb initialised\n");
 
-       ret = mfd_add_devices(dev, tc6387xb_cells,
-               ARRAY_SIZE(tc6387xb_cells), iomem, irq);
+       tc6387xb_cells[TC6387XB_CELL_MMC].platform_data =
+               &tc6387xb_cells[TC6387XB_CELL_MMC];
+       tc6387xb_cells[TC6387XB_CELL_MMC].data_size =
+               sizeof(tc6387xb_cells[TC6387XB_CELL_MMC]);
+
+       ret = mfd_add_devices(&dev->dev, dev->id, tc6387xb_cells,
+                             ARRAY_SIZE(tc6387xb_cells), iomem, irq);
 
        if (!ret)
                return 0;