Skip to content

Commit

Permalink
omap1: mailbox: kill compile warning
Browse files Browse the repository at this point in the history
use ioremap and remove unused variable to get rid
of compile warnings.

Signed-off-by: Felipe Balbi <felipe.balbi@nokia.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
  • Loading branch information
Felipe Balbi authored and Tony Lindgren committed Feb 15, 2010
1 parent 96fbd74 commit d761585
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
2 changes: 1 addition & 1 deletion arch/arm/mach-omap1/devices.c
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ static inline void omap_init_rtc(void) {}
# define INT_DSP_MAILBOX1 INT_1610_DSP_MAILBOX1
#endif

#define OMAP1_MBOX_BASE OMAP1_IO_ADDRESS(OMAP16XX_MAILBOX_BASE)
#define OMAP1_MBOX_BASE OMAP16XX_MAILBOX_BASE

static struct resource mbox_resources[] = {
{
Expand Down
9 changes: 7 additions & 2 deletions arch/arm/mach-omap1/mailbox.c
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,6 @@ EXPORT_SYMBOL(mbox_dsp_info);
static int __devinit omap1_mbox_probe(struct platform_device *pdev)
{
struct resource *res;
int ret = 0;

if (pdev->num_resources != 2) {
dev_err(&pdev->dev, "invalid number of resources: %d\n",
Expand All @@ -160,12 +159,18 @@ static int __devinit omap1_mbox_probe(struct platform_device *pdev)
dev_err(&pdev->dev, "invalid mem resource\n");
return -ENODEV;
}
mbox_base = res->start;

mbox_base = ioremap(res->start, resource_size(res));
if (!mbox_base) {
dev_err(&pdev->dev, "ioremap failed\n");
return -ENODEV;
}

/* DSP IRQ */
res = platform_get_resource(pdev, IORESOURCE_IRQ, 0);
if (unlikely(!res)) {
dev_err(&pdev->dev, "invalid irq resource\n");
iounmap(mbox_base);
return -ENODEV;
}
mbox_dsp_info.irq = res->start;
Expand Down

0 comments on commit d761585

Please sign in to comment.