Skip to content

Commit

Permalink
mfd: Change rdc321x resources flags to IORESOURCE_IO
Browse files Browse the repository at this point in the history
The rdc321x southbridge PCI device has no MEM PCI resources that we could
pass to mfd_add_devices. Since 33254dd5, mfd_add_device checks for the
mem_base argument that we set to NULL. Changing the resources passed to
our MFD cells from IORESOURCE_MEM to IORESOURCE_IO fixes that. Since we use
those resources as offsets to the PCI configuration space base address of
the southbridge device this is also more adequate.

Signed-off-by: Florian Fainelli <florian@openwrt.org>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
  • Loading branch information
Florian Fainelli authored and Samuel Ortiz committed May 27, 2010
1 parent 380c09f commit 8deca39
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions drivers/gpio/rdc321x-gpio.c
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ static int __devinit rdc321x_gpio_probe(struct platform_device *pdev)
return -ENOMEM;
}

r = platform_get_resource_byname(pdev, IORESOURCE_MEM, "gpio-reg1");
r = platform_get_resource_byname(pdev, IORESOURCE_IO, "gpio-reg1");
if (!r) {
dev_err(&pdev->dev, "failed to get gpio-reg1 resource\n");
err = -ENODEV;
Expand All @@ -159,7 +159,7 @@ static int __devinit rdc321x_gpio_probe(struct platform_device *pdev)
rdc321x_gpio_dev->reg1_ctrl_base = r->start;
rdc321x_gpio_dev->reg1_data_base = r->start + 0x4;

r = platform_get_resource_byname(pdev, IORESOURCE_MEM, "gpio-reg2");
r = platform_get_resource_byname(pdev, IORESOURCE_IO, "gpio-reg2");
if (!r) {
dev_err(&pdev->dev, "failed to get gpio-reg2 resource\n");
err = -ENODEV;
Expand Down
6 changes: 3 additions & 3 deletions drivers/mfd/rdc321x-southbridge.c
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ static struct resource rdc321x_wdt_resource[] = {
.name = "wdt-reg",
.start = RDC321X_WDT_CTRL,
.end = RDC321X_WDT_CTRL + 0x3,
.flags = IORESOURCE_MEM,
.flags = IORESOURCE_IO,
}
};

Expand All @@ -47,12 +47,12 @@ static struct resource rdc321x_gpio_resources[] = {
.name = "gpio-reg1",
.start = RDC321X_GPIO_CTRL_REG1,
.end = RDC321X_GPIO_CTRL_REG1 + 0x7,
.flags = IORESOURCE_MEM,
.flags = IORESOURCE_IO,
}, {
.name = "gpio-reg2",
.start = RDC321X_GPIO_CTRL_REG2,
.end = RDC321X_GPIO_CTRL_REG2 + 0x7,
.flags = IORESOURCE_MEM,
.flags = IORESOURCE_IO,
}
};

Expand Down
2 changes: 1 addition & 1 deletion drivers/watchdog/rdc321x_wdt.c
Original file line number Diff line number Diff line change
Expand Up @@ -237,7 +237,7 @@ static int __devinit rdc321x_wdt_probe(struct platform_device *pdev)
return -ENODEV;
}

r = platform_get_resource_byname(pdev, IORESOURCE_MEM, "wdt-reg");
r = platform_get_resource_byname(pdev, IORESOURCE_IO, "wdt-reg");
if (!r) {
dev_err(&pdev->dev, "failed to get wdt-reg resource\n");
return -ENODEV;
Expand Down

0 comments on commit 8deca39

Please sign in to comment.