diff options
author | Bartlomiej Zolnierkiewicz <bzolnier@gmail.com> | 2009-05-17 13:12:24 -0400 |
---|---|---|
committer | Bartlomiej Zolnierkiewicz <bzolnier@gmail.com> | 2009-05-17 13:12:24 -0400 |
commit | dca3983059a4481e4ae97bbf0ac4b4c21429e1a5 (patch) | |
tree | ee15aed0673b5474bdadc93e3054f361bf2e839b /drivers/ide/setup-pci.c | |
parent | 29e52cf793ded6bece50de50e738596f94f07d9f (diff) |
ide: pass number of ports to ide_host_{alloc,add}() (v2)
Pass number of ports to ide_host_{alloc,add}() and then update
all users accordingly.
v2:
- drop no longer needed NULL initializers in buddha.c, cmd640.c and gayle.c
(noticed by Sergei)
There should be no functional changes caused by this patch.
Acked-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Diffstat (limited to 'drivers/ide/setup-pci.c')
-rw-r--r-- | drivers/ide/setup-pci.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/ide/setup-pci.c b/drivers/ide/setup-pci.c index 82519ddc9108..d78f4c994517 100644 --- a/drivers/ide/setup-pci.c +++ b/drivers/ide/setup-pci.c | |||
@@ -538,7 +538,7 @@ int ide_pci_init_one(struct pci_dev *dev, const struct ide_port_info *d, | |||
538 | void *priv) | 538 | void *priv) |
539 | { | 539 | { |
540 | struct ide_host *host; | 540 | struct ide_host *host; |
541 | hw_regs_t hw[4], *hws[] = { NULL, NULL, NULL, NULL }; | 541 | hw_regs_t hw[2], *hws[] = { NULL, NULL }; |
542 | int ret; | 542 | int ret; |
543 | 543 | ||
544 | ret = ide_setup_pci_controller(dev, d, 1); | 544 | ret = ide_setup_pci_controller(dev, d, 1); |
@@ -547,7 +547,7 @@ int ide_pci_init_one(struct pci_dev *dev, const struct ide_port_info *d, | |||
547 | 547 | ||
548 | ide_pci_setup_ports(dev, d, &hw[0], &hws[0]); | 548 | ide_pci_setup_ports(dev, d, &hw[0], &hws[0]); |
549 | 549 | ||
550 | host = ide_host_alloc(d, hws); | 550 | host = ide_host_alloc(d, hws, 2); |
551 | if (host == NULL) { | 551 | if (host == NULL) { |
552 | ret = -ENOMEM; | 552 | ret = -ENOMEM; |
553 | goto out; | 553 | goto out; |
@@ -596,7 +596,7 @@ int ide_pci_init_two(struct pci_dev *dev1, struct pci_dev *dev2, | |||
596 | ide_pci_setup_ports(pdev[i], d, &hw[i*2], &hws[i*2]); | 596 | ide_pci_setup_ports(pdev[i], d, &hw[i*2], &hws[i*2]); |
597 | } | 597 | } |
598 | 598 | ||
599 | host = ide_host_alloc(d, hws); | 599 | host = ide_host_alloc(d, hws, 4); |
600 | if (host == NULL) { | 600 | if (host == NULL) { |
601 | ret = -ENOMEM; | 601 | ret = -ENOMEM; |
602 | goto out; | 602 | goto out; |