@@ -143,17 +143,16 @@ struct omap_mbox *omap1_mboxes[] = { &mbox_dsp_info, NULL };
static int __devinit omap1_mbox_probe(struct platform_device *pdev)
{
- struct resource *res;
+ struct resource *mem;
int ret;
int i;
struct omap_mbox **list;
- res = pdev->resource;
-
list = omap1_mboxes;
list[0]->irq = platform_get_irq_byname(pdev, "dsp");
- mbox_base = ioremap(res[0].start, resource_size(&res[0]));
+ mem = platform_get_resource(pdev, IORESOURCE_MEM, 0);
+ mbox_base = ioremap(mem->start, resource_size(mem));
if (!mbox_base)
return -ENOMEM;
@@ -388,13 +388,12 @@ struct omap_mbox *omap4_mboxes[] = { &mbox_1_info, &mbox_2_info, NULL };
static int __devinit omap2_mbox_probe(struct platform_device *pdev)
{
- struct resource *res;
+ struct resource *mem;
int ret;
struct omap_mbox **list;
- res = pdev->resource;
-
- if (false);
+ if (false)
+ ;
#if defined(CONFIG_ARCH_OMAP3430)
else if (cpu_is_omap3430()) {
list = omap3_mboxes;
@@ -423,7 +422,8 @@ static int __devinit omap2_mbox_probe(struct platform_device *pdev)
return -ENODEV;
}
- mbox_base = ioremap(res[0].start, resource_size(&res[0]));
+ mem = platform_get_resource(pdev, IORESOURCE_MEM, 0);
+ mbox_base = ioremap(mem->start, resource_size(mem));
if (!mbox_base)
return -ENOMEM;