aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-omap1/mailbox.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/arm/mach-omap1/mailbox.c')
-rw-r--r--arch/arm/mach-omap1/mailbox.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/arch/arm/mach-omap1/mailbox.c b/arch/arm/mach-omap1/mailbox.c
index caf889aaa248..4f5b3da3d559 100644
--- a/arch/arm/mach-omap1/mailbox.c
+++ b/arch/arm/mach-omap1/mailbox.c
@@ -146,7 +146,6 @@ EXPORT_SYMBOL(mbox_dsp_info);
146static int __devinit omap1_mbox_probe(struct platform_device *pdev) 146static int __devinit omap1_mbox_probe(struct platform_device *pdev)
147{ 147{
148 struct resource *res; 148 struct resource *res;
149 int ret = 0;
150 149
151 if (pdev->num_resources != 2) { 150 if (pdev->num_resources != 2) {
152 dev_err(&pdev->dev, "invalid number of resources: %d\n", 151 dev_err(&pdev->dev, "invalid number of resources: %d\n",
@@ -160,12 +159,18 @@ static int __devinit omap1_mbox_probe(struct platform_device *pdev)
160 dev_err(&pdev->dev, "invalid mem resource\n"); 159 dev_err(&pdev->dev, "invalid mem resource\n");
161 return -ENODEV; 160 return -ENODEV;
162 } 161 }
163 mbox_base = res->start; 162
163 mbox_base = ioremap(res->start, resource_size(res));
164 if (!mbox_base) {
165 dev_err(&pdev->dev, "ioremap failed\n");
166 return -ENODEV;
167 }
164 168
165 /* DSP IRQ */ 169 /* DSP IRQ */
166 res = platform_get_resource(pdev, IORESOURCE_IRQ, 0); 170 res = platform_get_resource(pdev, IORESOURCE_IRQ, 0);
167 if (unlikely(!res)) { 171 if (unlikely(!res)) {
168 dev_err(&pdev->dev, "invalid irq resource\n"); 172 dev_err(&pdev->dev, "invalid irq resource\n");
173 iounmap(mbox_base);
169 return -ENODEV; 174 return -ENODEV;
170 } 175 }
171 mbox_dsp_info.irq = res->start; 176 mbox_dsp_info.irq = res->start;