aboutsummaryrefslogtreecommitdiff
path: root/drivers/mfd/glamo/glamo-core.c
diff options
context:
space:
mode:
authorAndy Green <andy@openmoko.com>2009-01-27 14:39:11 +0000
committerAndy Green <agreen@octopus.localdomain>2009-01-27 14:39:11 +0000
commit971df5630f803ebb79e9e18abeb2aed84851aa27 (patch)
tree1fdad40b8fc01f4b7cc903e9a327b22349e2bda7 /drivers/mfd/glamo/glamo-core.c
parentbd7b7778d3b714f5f5070f02620b0ffc614b2dd8 (diff)
fix-glamo-core-from-balaji-tree.patch
Signed-off-by: Andy Green <andy@openmoko.com>
Diffstat (limited to 'drivers/mfd/glamo/glamo-core.c')
-rw-r--r--drivers/mfd/glamo/glamo-core.c28
1 files changed, 14 insertions, 14 deletions
diff --git a/drivers/mfd/glamo/glamo-core.c b/drivers/mfd/glamo/glamo-core.c
index b7184a38c31..b4595a8202d 100644
--- a/drivers/mfd/glamo/glamo-core.c
+++ b/drivers/mfd/glamo/glamo-core.c
@@ -288,15 +288,9 @@ static struct resource glamo_mmc_resources[] = {
},
};
-static struct platform_device glamo_mmc_dev = {
- .name = "glamo-mci",
- .resource = glamo_mmc_resources,
- .num_resources = ARRAY_SIZE(glamo_mmc_resources),
-};
-
struct glamo_mci_pdata glamo_mci_def_pdata = {
.gpio_detect = 0,
- .glamo_set_mci_power = NULL, /* filled in from MFD platform data */
+ .glamo_can_set_mci_power = NULL, /* filled in from MFD platform data */
.ocr_avail = MMC_VDD_20_21 |
MMC_VDD_21_22 |
MMC_VDD_22_23 |
@@ -1153,6 +1147,7 @@ static int __init glamo_probe(struct platform_device *pdev)
{
int rc = 0, irq;
struct glamo_core *glamo;
+ struct platform_device *glamo_mmc_dev;
if (glamo_handle) {
dev_err(&pdev->dev,
@@ -1247,8 +1242,8 @@ static int __init glamo_probe(struct platform_device *pdev)
glamo_pll_rate(glamo, GLAMO_PLL2));
/* bring MCI specific stuff over from our MFD platform data */
- glamo_mci_def_pdata.glamo_set_mci_power =
- glamo->pdata->glamo_set_mci_power;
+ glamo_mci_def_pdata.glamo_can_set_mci_power =
+ glamo->pdata->glamo_can_set_mci_power;
glamo_mci_def_pdata.glamo_mci_use_slow =
glamo->pdata->glamo_mci_use_slow;
glamo_mci_def_pdata.glamo_irq_is_wired =
@@ -1288,12 +1283,17 @@ static int __init glamo_probe(struct platform_device *pdev)
glamo_spigpio_dev.dev.platform_data = glamo->pdata->spigpio_info;
platform_device_register(&glamo_spigpio_dev);
- glamo_mmc_dev.dev.parent = &pdev->dev;
+ glamo_mmc_dev = glamo->pdata->mmc_dev;
+ glamo_mmc_dev->name = "glamo-mci";
+ glamo_mmc_dev->dev.parent = &pdev->dev;
+ glamo_mmc_dev->resource = glamo_mmc_resources;
+ glamo_mmc_dev->num_resources = ARRAY_SIZE(glamo_mmc_resources);
+
/* we need it later to give to the engine enable and disable */
glamo_mci_def_pdata.pglamo = glamo;
- mangle_mem_resources(glamo_mmc_dev.resource,
- glamo_mmc_dev.num_resources, glamo->mem);
- platform_device_register(&glamo_mmc_dev);
+ mangle_mem_resources(glamo_mmc_dev->resource,
+ glamo_mmc_dev->num_resources, glamo->mem);
+ platform_device_register(glamo_mmc_dev);
/* only request the generic, hostbus and memory controller MMIO */
glamo->mem = request_mem_region(glamo->mem->start,
@@ -1338,7 +1338,7 @@ static int glamo_remove(struct platform_device *pdev)
platform_set_drvdata(pdev, NULL);
platform_device_unregister(&glamo_fb_dev);
- platform_device_unregister(&glamo_mmc_dev);
+ platform_device_unregister(glamo->pdata->mmc_dev);
iounmap(glamo->base);
release_mem_region(glamo->mem->start, GLAMO_REGOFS_VIDCAP);
glamo_handle = NULL;