Commit 706afa06 authored by Martin Dalecki's avatar Martin Dalecki Committed by Linus Torvalds

[PATCH] 2.5.5-pre1 IDE cleanup

The attached patch does:

1. Kill two exports which mankind will never know what they where good for

2. Kill duplicated comments.

3. Kill declarations of never defined functions

4. Some other minor tidups here and there.
parent 4d22d666
...@@ -406,22 +406,19 @@ static void enable_nest (ide_drive_t *drive) ...@@ -406,22 +406,19 @@ static void enable_nest (ide_drive_t *drive)
} }
/* /*
* probe_for_drive() tests for existence of a given drive using do_probe(). * Tests for existence of a given drive using do_probe().
*
* Returns: 0 no device was found
* 1 device was found (note: drive->present might still be 0)
*/ */
static inline byte probe_for_drive (ide_drive_t *drive) static inline void probe_for_drive (ide_drive_t *drive)
{ {
if (drive->noprobe) /* skip probing? */ if (drive->noprobe) /* skip probing? */
return drive->present; return;
if (do_probe(drive, WIN_IDENTIFY) >= 2) { /* if !(success||timed-out) */ if (do_probe(drive, WIN_IDENTIFY) >= 2) { /* if !(success||timed-out) */
(void) do_probe(drive, WIN_PIDENTIFY); /* look for ATAPI device */ do_probe(drive, WIN_PIDENTIFY); /* look for ATAPI device */
} }
if (drive->id && strstr(drive->id->model, "E X A B Y T E N E S T")) if (drive->id && strstr(drive->id->model, "E X A B Y T E N E S T"))
enable_nest(drive); enable_nest(drive);
if (!drive->present) if (!drive->present)
return 0; /* drive not found */ return; /* drive not found */
if (drive->id == NULL) { /* identification failed? */ if (drive->id == NULL) { /* identification failed? */
if (drive->media == ide_disk) { if (drive->media == ide_disk) {
printk ("%s: non-IDE drive, CHS=%d/%d/%d\n", printk ("%s: non-IDE drive, CHS=%d/%d/%d\n",
...@@ -432,7 +429,6 @@ static inline byte probe_for_drive (ide_drive_t *drive) ...@@ -432,7 +429,6 @@ static inline byte probe_for_drive (ide_drive_t *drive)
drive->present = 0; /* nuke it */ drive->present = 0; /* nuke it */
} }
} }
return 1; /* drive was found */
} }
/* /*
...@@ -548,7 +544,7 @@ static void probe_hwif (ide_hwif_t *hwif) ...@@ -548,7 +544,7 @@ static void probe_hwif (ide_hwif_t *hwif)
*/ */
for (unit = 0; unit < MAX_DRIVES; ++unit) { for (unit = 0; unit < MAX_DRIVES; ++unit) {
ide_drive_t *drive = &hwif->drives[unit]; ide_drive_t *drive = &hwif->drives[unit];
(void) probe_for_drive (drive); probe_for_drive (drive);
if (drive->present && !hwif->present) { if (drive->present && !hwif->present) {
hwif->present = 1; hwif->present = 1;
if (hwif->chipset != ide_4drives || !hwif->mate->present) { if (hwif->chipset != ide_4drives || !hwif->mate->present) {
...@@ -931,19 +927,6 @@ static int hwif_init (ide_hwif_t *hwif) ...@@ -931,19 +927,6 @@ static int hwif_init (ide_hwif_t *hwif)
return hwif->present; return hwif->present;
} }
void export_ide_init_queue (ide_drive_t *drive)
{
ide_init_queue(drive);
}
byte export_probe_for_drive (ide_drive_t *drive)
{
return probe_for_drive(drive);
}
EXPORT_SYMBOL(export_ide_init_queue);
EXPORT_SYMBOL(export_probe_for_drive);
int ideprobe_init (void); int ideprobe_init (void);
static ide_module_t ideprobe_module = { static ide_module_t ideprobe_module = {
IDE_PROBE_MODULE, IDE_PROBE_MODULE,
......
...@@ -1965,11 +1965,10 @@ ide_proc_entry_t generic_subdriver_entries[] = { ...@@ -1965,11 +1965,10 @@ ide_proc_entry_t generic_subdriver_entries[] = {
#endif #endif
/* /*
* Note that we only release the standard ports, * Note that we only release the standard ports, and do not even try to handle
* and do not even try to handle any extra ports * any extra ports allocated for weird IDE interface chipsets.
* allocated for weird IDE interface chipsets.
*/ */
void hwif_unregister (ide_hwif_t *hwif) static void hwif_unregister(ide_hwif_t *hwif)
{ {
if (hwif->straight8) { if (hwif->straight8) {
ide_release_region(hwif->io_ports[IDE_DATA_OFFSET], 8); ide_release_region(hwif->io_ports[IDE_DATA_OFFSET], 8);
...@@ -2063,11 +2062,6 @@ void ide_unregister (unsigned int index) ...@@ -2063,11 +2062,6 @@ void ide_unregister (unsigned int index)
if (irq_count == 1) if (irq_count == 1)
free_irq(hwif->irq, hwgroup); free_irq(hwif->irq, hwgroup);
/*
* Note that we only release the standard ports,
* and do not even try to handle any extra ports
* allocated for weird IDE interface chipsets.
*/
hwif_unregister(hwif); hwif_unregister(hwif);
/* /*
...@@ -3718,7 +3712,6 @@ EXPORT_SYMBOL(ide_register_hw); ...@@ -3718,7 +3712,6 @@ EXPORT_SYMBOL(ide_register_hw);
EXPORT_SYMBOL(ide_register); EXPORT_SYMBOL(ide_register);
EXPORT_SYMBOL(ide_unregister); EXPORT_SYMBOL(ide_unregister);
EXPORT_SYMBOL(ide_setup_ports); EXPORT_SYMBOL(ide_setup_ports);
EXPORT_SYMBOL(hwif_unregister);
EXPORT_SYMBOL(get_info_ptr); EXPORT_SYMBOL(get_info_ptr);
EXPORT_SYMBOL(current_capacity); EXPORT_SYMBOL(current_capacity);
......
...@@ -1101,7 +1101,6 @@ int ide_replace_subdriver(ide_drive_t *drive, const char *driver); ...@@ -1101,7 +1101,6 @@ int ide_replace_subdriver(ide_drive_t *drive, const char *driver);
# define OFF_BOARD NEVER_BOARD # define OFF_BOARD NEVER_BOARD
#endif /* CONFIG_BLK_DEV_OFFBOARD */ #endif /* CONFIG_BLK_DEV_OFFBOARD */
unsigned long ide_find_free_region (unsigned short size) __init;
void ide_scan_pcibus (int scan_direction) __init; void ide_scan_pcibus (int scan_direction) __init;
#endif #endif
#ifdef CONFIG_BLK_DEV_IDEDMA #ifdef CONFIG_BLK_DEV_IDEDMA
...@@ -1115,14 +1114,10 @@ int report_drive_dmaing (ide_drive_t *drive); ...@@ -1115,14 +1114,10 @@ int report_drive_dmaing (ide_drive_t *drive);
int ide_dmaproc (ide_dma_action_t func, ide_drive_t *drive); int ide_dmaproc (ide_dma_action_t func, ide_drive_t *drive);
int ide_release_dma (ide_hwif_t *hwif); int ide_release_dma (ide_hwif_t *hwif);
void ide_setup_dma (ide_hwif_t *hwif, unsigned long dmabase, unsigned int num_ports) __init; void ide_setup_dma (ide_hwif_t *hwif, unsigned long dmabase, unsigned int num_ports) __init;
unsigned long ide_get_or_set_dma_base (ide_hwif_t *hwif, int extra, const char *name) __init; /* FIXME spilt this up into a get and set function */
extern unsigned long ide_get_or_set_dma_base (ide_hwif_t *hwif, int extra, const char *name) __init;
#endif #endif
void hwif_unregister (ide_hwif_t *hwif);
void export_ide_init_queue (ide_drive_t *drive);
byte export_probe_for_drive (ide_drive_t *drive);
extern spinlock_t ide_lock; extern spinlock_t ide_lock;
extern int drive_is_ready(ide_drive_t *drive); extern int drive_is_ready(ide_drive_t *drive);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment