diff options
-rw-r--r-- | arch/powerpc/sysdev/fsl_rio.c | 9 | ||||
-rw-r--r-- | drivers/rapidio/rio.c | 14 |
2 files changed, 10 insertions, 13 deletions
diff --git a/arch/powerpc/sysdev/fsl_rio.c b/arch/powerpc/sysdev/fsl_rio.c index 8d26533ba98e..14232d57369c 100644 --- a/arch/powerpc/sysdev/fsl_rio.c +++ b/arch/powerpc/sysdev/fsl_rio.c | |||
@@ -1432,6 +1432,14 @@ int fsl_rio_setup(struct platform_device *dev) | |||
1432 | port->iores.flags = IORESOURCE_MEM; | 1432 | port->iores.flags = IORESOURCE_MEM; |
1433 | port->iores.name = "rio_io_win"; | 1433 | port->iores.name = "rio_io_win"; |
1434 | 1434 | ||
1435 | if (request_resource(&iomem_resource, &port->iores) < 0) { | ||
1436 | dev_err(&dev->dev, "RIO: Error requesting master port region" | ||
1437 | " 0x%016llx-0x%016llx\n", | ||
1438 | (u64)port->iores.start, (u64)port->iores.end); | ||
1439 | rc = -ENOMEM; | ||
1440 | goto err_res; | ||
1441 | } | ||
1442 | |||
1435 | priv->pwirq = irq_of_parse_and_map(dev->dev.of_node, 0); | 1443 | priv->pwirq = irq_of_parse_and_map(dev->dev.of_node, 0); |
1436 | priv->bellirq = irq_of_parse_and_map(dev->dev.of_node, 2); | 1444 | priv->bellirq = irq_of_parse_and_map(dev->dev.of_node, 2); |
1437 | priv->txirq = irq_of_parse_and_map(dev->dev.of_node, 3); | 1445 | priv->txirq = irq_of_parse_and_map(dev->dev.of_node, 3); |
@@ -1536,6 +1544,7 @@ int fsl_rio_setup(struct platform_device *dev) | |||
1536 | return 0; | 1544 | return 0; |
1537 | err: | 1545 | err: |
1538 | iounmap(priv->regs_win); | 1546 | iounmap(priv->regs_win); |
1547 | err_res: | ||
1539 | kfree(priv); | 1548 | kfree(priv); |
1540 | err_priv: | 1549 | err_priv: |
1541 | kfree(port); | 1550 | kfree(port); |
diff --git a/drivers/rapidio/rio.c b/drivers/rapidio/rio.c index 9a7b2168d1d5..c29719cacbca 100644 --- a/drivers/rapidio/rio.c +++ b/drivers/rapidio/rio.c | |||
@@ -1137,20 +1137,9 @@ static int __devinit rio_init(void) | |||
1137 | 1137 | ||
1138 | int __devinit rio_init_mports(void) | 1138 | int __devinit rio_init_mports(void) |
1139 | { | 1139 | { |
1140 | int rc = 0; | ||
1141 | struct rio_mport *port; | 1140 | struct rio_mport *port; |
1142 | 1141 | ||
1143 | list_for_each_entry(port, &rio_mports, node) { | 1142 | list_for_each_entry(port, &rio_mports, node) { |
1144 | if (!request_mem_region(port->iores.start, | ||
1145 | resource_size(&port->iores), | ||
1146 | port->name)) { | ||
1147 | printk(KERN_ERR | ||
1148 | "RIO: Error requesting master port region 0x%016llx-0x%016llx\n", | ||
1149 | (u64)port->iores.start, (u64)port->iores.end); | ||
1150 | rc = -ENOMEM; | ||
1151 | goto out; | ||
1152 | } | ||
1153 | |||
1154 | if (port->host_deviceid >= 0) | 1143 | if (port->host_deviceid >= 0) |
1155 | rio_enum_mport(port); | 1144 | rio_enum_mport(port); |
1156 | else | 1145 | else |
@@ -1159,8 +1148,7 @@ int __devinit rio_init_mports(void) | |||
1159 | 1148 | ||
1160 | rio_init(); | 1149 | rio_init(); |
1161 | 1150 | ||
1162 | out: | 1151 | return 0; |
1163 | return rc; | ||
1164 | } | 1152 | } |
1165 | 1153 | ||
1166 | device_initcall_sync(rio_init_mports); | 1154 | device_initcall_sync(rio_init_mports); |