diff options
Diffstat (limited to 'drivers/ide/ide-probe.c')
-rw-r--r-- | drivers/ide/ide-probe.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/drivers/ide/ide-probe.c b/drivers/ide/ide-probe.c index f17ba1932ad6..6c7451a6e609 100644 --- a/drivers/ide/ide-probe.c +++ b/drivers/ide/ide-probe.c | |||
@@ -1261,7 +1261,8 @@ out_nomem: | |||
1261 | return -ENOMEM; | 1261 | return -ENOMEM; |
1262 | } | 1262 | } |
1263 | 1263 | ||
1264 | struct ide_host *ide_host_alloc(const struct ide_port_info *d, hw_regs_t **hws) | 1264 | struct ide_host *ide_host_alloc(const struct ide_port_info *d, hw_regs_t **hws, |
1265 | unsigned int n_ports) | ||
1265 | { | 1266 | { |
1266 | struct ide_host *host; | 1267 | struct ide_host *host; |
1267 | struct device *dev = hws[0] ? hws[0]->dev : NULL; | 1268 | struct device *dev = hws[0] ? hws[0]->dev : NULL; |
@@ -1272,7 +1273,7 @@ struct ide_host *ide_host_alloc(const struct ide_port_info *d, hw_regs_t **hws) | |||
1272 | if (host == NULL) | 1273 | if (host == NULL) |
1273 | return NULL; | 1274 | return NULL; |
1274 | 1275 | ||
1275 | for (i = 0; i < MAX_HOST_PORTS; i++) { | 1276 | for (i = 0; i < n_ports; i++) { |
1276 | ide_hwif_t *hwif; | 1277 | ide_hwif_t *hwif; |
1277 | int idx; | 1278 | int idx; |
1278 | 1279 | ||
@@ -1443,12 +1444,12 @@ int ide_host_register(struct ide_host *host, const struct ide_port_info *d, | |||
1443 | EXPORT_SYMBOL_GPL(ide_host_register); | 1444 | EXPORT_SYMBOL_GPL(ide_host_register); |
1444 | 1445 | ||
1445 | int ide_host_add(const struct ide_port_info *d, hw_regs_t **hws, | 1446 | int ide_host_add(const struct ide_port_info *d, hw_regs_t **hws, |
1446 | struct ide_host **hostp) | 1447 | unsigned int n_ports, struct ide_host **hostp) |
1447 | { | 1448 | { |
1448 | struct ide_host *host; | 1449 | struct ide_host *host; |
1449 | int rc; | 1450 | int rc; |
1450 | 1451 | ||
1451 | host = ide_host_alloc(d, hws); | 1452 | host = ide_host_alloc(d, hws, n_ports); |
1452 | if (host == NULL) | 1453 | if (host == NULL) |
1453 | return -ENOMEM; | 1454 | return -ENOMEM; |
1454 | 1455 | ||