]> git.hungrycats.org Git - linux/commitdiff
[PATCH] 2.5.5-pre1 IDE cleanup
authorMartin Dalecki <dalecki@evision-ventures.com>
Tue, 19 Feb 2002 09:20:01 +0000 (01:20 -0800)
committerLinus Torvalds <torvalds@penguin.transmeta.com>
Tue, 19 Feb 2002 09:20:01 +0000 (01:20 -0800)
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.

drivers/ide/ide-probe.c
drivers/ide/ide.c
include/linux/ide.h

index d8f8d95282e1cb723795eb17a05e40101da3138f..3564a060d32e2bd9c10e468053d897bb1b95a41a 100644 (file)
@@ -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().
- *
- * Returns:    0  no device was found
- *             1  device was found (note: drive->present might still be 0)
+ * Tests for existence of a given drive using do_probe().
  */
-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? */
-               return drive->present;
+               return;
        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"))
                enable_nest(drive);
        if (!drive->present)
-               return 0;                       /* drive not found */
+               return;                 /* drive not found */
        if (drive->id == NULL) {                /* identification failed? */
                if (drive->media == ide_disk) {
                        printk ("%s: non-IDE drive, CHS=%d/%d/%d\n",
@@ -432,7 +429,6 @@ static inline byte probe_for_drive (ide_drive_t *drive)
                        drive->present = 0;     /* nuke it */
                }
        }
-       return 1;       /* drive was found */
 }
 
 /*
@@ -548,7 +544,7 @@ static void probe_hwif (ide_hwif_t *hwif)
         */
        for (unit = 0; unit < MAX_DRIVES; ++unit) {
                ide_drive_t *drive = &hwif->drives[unit];
-               (void) probe_for_drive (drive);
+               probe_for_drive (drive);
                if (drive->present && !hwif->present) {
                        hwif->present = 1;
                        if (hwif->chipset != ide_4drives || !hwif->mate->present) {
@@ -931,19 +927,6 @@ static int hwif_init (ide_hwif_t *hwif)
        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);
 static ide_module_t ideprobe_module = {
        IDE_PROBE_MODULE,
index 1679d918fd18426d8a72647990c885d2045eb2ac..52909c502406bd79e9fb88cc97d0ff603e896a72 100644 (file)
@@ -1965,11 +1965,10 @@ ide_proc_entry_t generic_subdriver_entries[] = {
 #endif
 
 /*
- * Note that we only release the standard ports,
- * and do not even try to handle any extra ports
- * allocated for weird IDE interface chipsets.
+ * Note that we only release the standard ports, and do not even try to handle
+ * any extra ports allocated for weird IDE interface chipsets.
  */
-void hwif_unregister (ide_hwif_t *hwif)
+static void hwif_unregister(ide_hwif_t *hwif)
 {
        if (hwif->straight8) {
                ide_release_region(hwif->io_ports[IDE_DATA_OFFSET], 8);
@@ -2063,11 +2062,6 @@ void ide_unregister (unsigned int index)
        if (irq_count == 1)
                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);
 
        /*
@@ -3718,7 +3712,6 @@ EXPORT_SYMBOL(ide_register_hw);
 EXPORT_SYMBOL(ide_register);
 EXPORT_SYMBOL(ide_unregister);
 EXPORT_SYMBOL(ide_setup_ports);
-EXPORT_SYMBOL(hwif_unregister);
 EXPORT_SYMBOL(get_info_ptr);
 EXPORT_SYMBOL(current_capacity);
 
index 9eb8ee4b3aa0fcbd516694d94dee417cc77a94f4..daa84dc1775f370e8977554d729122201fa21acb 100644 (file)
@@ -1101,7 +1101,6 @@ int ide_replace_subdriver(ide_drive_t *drive, const char *driver);
 #  define OFF_BOARD            NEVER_BOARD
 #endif /* CONFIG_BLK_DEV_OFFBOARD */
 
-unsigned long ide_find_free_region (unsigned short size) __init;
 void ide_scan_pcibus (int scan_direction) __init;
 #endif
 #ifdef CONFIG_BLK_DEV_IDEDMA
@@ -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_release_dma (ide_hwif_t *hwif);
 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
 
-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 int drive_is_ready(ide_drive_t *drive);