aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/ide/arm/icside.c
diff options
context:
space:
mode:
authorBartlomiej Zolnierkiewicz <bzolnier@gmail.com>2007-10-19 18:32:31 -0400
committerBartlomiej Zolnierkiewicz <bzolnier@gmail.com>2007-10-19 18:32:31 -0400
commit8447d9d52adbe4c653482bd0d5ccb9b5d26f9c9d (patch)
tree358aa3ca6b0657623b84e7c6278f90fc95a32879 /drivers/ide/arm/icside.c
parentfd9bb53942a7ca3398a63f2c238afd8fbed3ec0e (diff)
ide: add ide_device_add()
* Add ide_device_add() helper and convert host drivers to use it instead of open-coded variants. * Make ide_pci_setup_ports() and do_ide_setup_pci_device() take 'u8 *idx' argument instead of 'ata_index_t *index'. * Remove no longer needed ata_index_t. * Unexport probe_hwif_init() and make it static. * Unexport ide_proc_register_port(). There should be no functionality changes caused by this patch (sgiioc4.c: ide_proc_register_port() requires hwif->present to be set and it won't be set if probe_hwif_init() fails). Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Diffstat (limited to 'drivers/ide/arm/icside.c')
-rw-r--r--drivers/ide/arm/icside.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/drivers/ide/arm/icside.c b/drivers/ide/arm/icside.c
index 3af33fbf1f88..6298932c0589 100644
--- a/drivers/ide/arm/icside.c
+++ b/drivers/ide/arm/icside.c
@@ -500,6 +500,7 @@ icside_register_v5(struct icside_state *state, struct expansion_card *ec)
500{ 500{
501 ide_hwif_t *hwif; 501 ide_hwif_t *hwif;
502 void __iomem *base; 502 void __iomem *base;
503 u8 idx[4] = { 0xff, 0xff, 0xff, 0xff };
503 504
504 base = ecardm_iomap(ec, ECARD_RES_MEMC, 0, 0); 505 base = ecardm_iomap(ec, ECARD_RES_MEMC, 0, 0);
505 if (!base) 506 if (!base)
@@ -523,9 +524,9 @@ icside_register_v5(struct icside_state *state, struct expansion_card *ec)
523 524
524 state->hwif[0] = hwif; 525 state->hwif[0] = hwif;
525 526
526 probe_hwif_init(hwif); 527 idx[0] = hwif->index;
527 528
528 ide_proc_register_port(hwif); 529 ide_device_add(idx);
529 530
530 return 0; 531 return 0;
531} 532}
@@ -537,6 +538,7 @@ icside_register_v6(struct icside_state *state, struct expansion_card *ec)
537 void __iomem *ioc_base, *easi_base; 538 void __iomem *ioc_base, *easi_base;
538 unsigned int sel = 0; 539 unsigned int sel = 0;
539 int ret; 540 int ret;
541 u8 idx[4] = { 0xff, 0xff, 0xff, 0xff };
540 542
541 ioc_base = ecardm_iomap(ec, ECARD_RES_IOCFAST, 0, 0); 543 ioc_base = ecardm_iomap(ec, ECARD_RES_IOCFAST, 0, 0);
542 if (!ioc_base) { 544 if (!ioc_base) {
@@ -608,11 +610,10 @@ icside_register_v6(struct icside_state *state, struct expansion_card *ec)
608 icside_dma_init(mate); 610 icside_dma_init(mate);
609 } 611 }
610 612
611 probe_hwif_init(hwif); 613 idx[0] = hwif->index;
612 probe_hwif_init(mate); 614 idx[1] = mate->index;
613 615
614 ide_proc_register_port(hwif); 616 ide_device_add(idx);
615 ide_proc_register_port(mate);
616 617
617 return 0; 618 return 0;
618 619