aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorBartlomiej Zolnierkiewicz <bzolnier@gmail.com>2008-04-27 09:38:31 -0400
committerBartlomiej Zolnierkiewicz <bzolnier@gmail.com>2008-04-27 09:38:31 -0400
commitbf64b7a9ddc604883a1f41535d3d7a62bca9ee81 (patch)
treeba90b776e1988a3463fe996d3c47c866c5028f03 /drivers
parent16019c35283e99b4b95b8a0757845bc2d0696b20 (diff)
ide: sanitize ide_unregister() usage
* Remove ide_unregister() call from ide_exit() (host drivers take care of unregistering hwif-s themselves). * Remove ide_unregister() call from probe methods of bast-ide, palm_bk3710, ide-cs and delkin_cb host drivers (ide_find_port() returns only free ide_hwifs[] entries). Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/ide/arm/bast-ide.c6
-rw-r--r--drivers/ide/arm/palm_bk3710.c6
-rw-r--r--drivers/ide/ide.c5
-rw-r--r--drivers/ide/legacy/ide-cs.c6
-rw-r--r--drivers/ide/pci/delkin_cb.c6
5 files changed, 4 insertions, 25 deletions
diff --git a/drivers/ide/arm/bast-ide.c b/drivers/ide/arm/bast-ide.c
index d158f579bde2..df09f0372605 100644
--- a/drivers/ide/arm/bast-ide.c
+++ b/drivers/ide/arm/bast-ide.c
@@ -49,11 +49,7 @@ static int __init bastide_register(unsigned int base, unsigned int aux, int irq)
49 49
50 i = hwif->index; 50 i = hwif->index;
51 51
52 if (hwif->present) 52 ide_init_port_data(hwif, i);
53 ide_unregister(i);
54 else
55 ide_init_port_data(hwif, i);
56
57 ide_init_port_hw(hwif, &hw); 53 ide_init_port_hw(hwif, &hw);
58 hwif->port_ops = NULL; 54 hwif->port_ops = NULL;
59 55
diff --git a/drivers/ide/arm/palm_bk3710.c b/drivers/ide/arm/palm_bk3710.c
index 8fa34e26443a..208d7f2d6d10 100644
--- a/drivers/ide/arm/palm_bk3710.c
+++ b/drivers/ide/arm/palm_bk3710.c
@@ -398,11 +398,7 @@ static int __devinit palm_bk3710_probe(struct platform_device *pdev)
398 398
399 i = hwif->index; 399 i = hwif->index;
400 400
401 if (hwif->present) 401 ide_init_port_data(hwif, i);
402 ide_unregister(i);
403 else
404 ide_init_port_data(hwif, i);
405
406 ide_init_port_hw(hwif, &hw); 402 ide_init_port_hw(hwif, &hw);
407 403
408 hwif->mmio = 1; 404 hwif->mmio = 1;
diff --git a/drivers/ide/ide.c b/drivers/ide/ide.c
index 78e49e8461a2..53c6a038e179 100644
--- a/drivers/ide/ide.c
+++ b/drivers/ide/ide.c
@@ -1349,11 +1349,6 @@ int __init init_module (void)
1349 1349
1350void __exit cleanup_module (void) 1350void __exit cleanup_module (void)
1351{ 1351{
1352 int index;
1353
1354 for (index = 0; index < MAX_HWIFS; ++index)
1355 ide_unregister(index);
1356
1357 proc_ide_destroy(); 1352 proc_ide_destroy();
1358 1353
1359 class_destroy(ide_port_class); 1354 class_destroy(ide_port_class);
diff --git a/drivers/ide/legacy/ide-cs.c b/drivers/ide/legacy/ide-cs.c
index 855e157b18d3..867fe14e5de3 100644
--- a/drivers/ide/legacy/ide-cs.c
+++ b/drivers/ide/legacy/ide-cs.c
@@ -183,11 +183,7 @@ static ide_hwif_t *idecs_register(unsigned long io, unsigned long ctl,
183 183
184 i = hwif->index; 184 i = hwif->index;
185 185
186 if (hwif->present) 186 ide_init_port_data(hwif, i);
187 ide_unregister(i);
188 else
189 ide_init_port_data(hwif, i);
190
191 ide_init_port_hw(hwif, &hw); 187 ide_init_port_hw(hwif, &hw);
192 hwif->port_ops = &idecs_port_ops; 188 hwif->port_ops = &idecs_port_ops;
193 189
diff --git a/drivers/ide/pci/delkin_cb.c b/drivers/ide/pci/delkin_cb.c
index c7b7e0483287..7b0ab178459c 100644
--- a/drivers/ide/pci/delkin_cb.c
+++ b/drivers/ide/pci/delkin_cb.c
@@ -87,11 +87,7 @@ delkin_cb_probe (struct pci_dev *dev, const struct pci_device_id *id)
87 87
88 i = hwif->index; 88 i = hwif->index;
89 89
90 if (hwif->present) 90 ide_init_port_data(hwif, i);
91 ide_unregister(i);
92 else
93 ide_init_port_data(hwif, i);
94
95 ide_init_port_hw(hwif, &hw); 91 ide_init_port_hw(hwif, &hw);
96 hwif->port_ops = &delkin_cb_port_ops; 92 hwif->port_ops = &delkin_cb_port_ops;
97 93