diff options
Diffstat (limited to 'arch/arm/mach-omap1')
-rw-r--r-- | arch/arm/mach-omap1/devices.c | 2 | ||||
-rw-r--r-- | arch/arm/mach-omap1/mailbox.c | 9 |
2 files changed, 8 insertions, 3 deletions
diff --git a/arch/arm/mach-omap1/devices.c b/arch/arm/mach-omap1/devices.c index a2d07aa75c9e..379100c17639 100644 --- a/arch/arm/mach-omap1/devices.c +++ b/arch/arm/mach-omap1/devices.c | |||
@@ -73,7 +73,7 @@ static inline void omap_init_rtc(void) {} | |||
73 | # define INT_DSP_MAILBOX1 INT_1610_DSP_MAILBOX1 | 73 | # define INT_DSP_MAILBOX1 INT_1610_DSP_MAILBOX1 |
74 | #endif | 74 | #endif |
75 | 75 | ||
76 | #define OMAP1_MBOX_BASE OMAP1_IO_ADDRESS(OMAP16XX_MAILBOX_BASE) | 76 | #define OMAP1_MBOX_BASE OMAP16XX_MAILBOX_BASE |
77 | 77 | ||
78 | static struct resource mbox_resources[] = { | 78 | static struct resource mbox_resources[] = { |
79 | { | 79 | { |
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); | |||
146 | static int __devinit omap1_mbox_probe(struct platform_device *pdev) | 146 | static 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; |