]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
ide: drop "PIO data" argument from ide_get_best_pio_mode()
authorBartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Thu, 19 Jul 2007 23:11:58 +0000 (01:11 +0200)
committerBartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Thu, 19 Jul 2007 23:11:58 +0000 (01:11 +0200)
* Drop no longer needed "PIO data" argument from ide_get_best_pio_mode()
  and convert all users accordingly.

* Remove no longer needed ide_pio_data_t.

Acked-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
37 files changed:
drivers/ide/ide-lib.c
drivers/ide/legacy/ali14xx.c
drivers/ide/legacy/dtc2278.c
drivers/ide/legacy/ht6560b.c
drivers/ide/legacy/qd65xx.c
drivers/ide/legacy/umc8672.c
drivers/ide/mips/au1xxx-ide.c
drivers/ide/pci/aec62xx.c
drivers/ide/pci/alim15x3.c
drivers/ide/pci/atiixp.c
drivers/ide/pci/cmd640.c
drivers/ide/pci/cmd64x.c
drivers/ide/pci/cs5520.c
drivers/ide/pci/cs5530.c
drivers/ide/pci/cs5535.c
drivers/ide/pci/cy82c693.c
drivers/ide/pci/hpt34x.c
drivers/ide/pci/hpt366.c
drivers/ide/pci/it8213.c
drivers/ide/pci/it821x.c
drivers/ide/pci/jmicron.c
drivers/ide/pci/opti621.c
drivers/ide/pci/pdc202xx_new.c
drivers/ide/pci/pdc202xx_old.c
drivers/ide/pci/piix.c
drivers/ide/pci/sc1200.c
drivers/ide/pci/scc_pata.c
drivers/ide/pci/serverworks.c
drivers/ide/pci/siimage.c
drivers/ide/pci/sis5513.c
drivers/ide/pci/sl82c105.c
drivers/ide/pci/slc90e66.c
drivers/ide/pci/tc86c001.c
drivers/ide/pci/triflex.c
drivers/ide/ppc/mpc8xx.c
drivers/ide/ppc/pmac.c
include/linux/ide.h

index 6e85bee0bef7c85beda19721ff916d3fb3dcc121..df29868209f39f15cb4e7aaae67215cf06660b46 100644 (file)
@@ -277,7 +277,6 @@ EXPORT_SYMBOL_GPL(ide_pio_cycle_time);
  *     @drive: drive to consider
  *     @mode_wanted: preferred mode
  *     @max_mode: highest allowed mode
- *     @d: PIO data
  *
  *     This routine returns the recommended PIO settings for a given drive,
  *     based on the drive->id information and the ide_pio_blacklist[].
@@ -286,7 +285,7 @@ EXPORT_SYMBOL_GPL(ide_pio_cycle_time);
  *     This is used by most chipset support modules when "auto-tuning".
  */
 
-u8 ide_get_best_pio_mode (ide_drive_t *drive, u8 mode_wanted, u8 max_mode, ide_pio_data_t *d)
+u8 ide_get_best_pio_mode (ide_drive_t *drive, u8 mode_wanted, u8 max_mode)
 {
        int pio_mode;
        struct hd_driveid* id = drive->id;
@@ -335,9 +334,6 @@ u8 ide_get_best_pio_mode (ide_drive_t *drive, u8 mode_wanted, u8 max_mode, ide_p
        if (pio_mode > max_mode)
                pio_mode = max_mode;
 
-       if (d)
-               d->pio_mode = pio_mode;
-
        return pio_mode;
 }
 
index 30aeb8750c00a64c47a26948ed94d2d470e259fc..d5c7a57b71c1f0b056af59b0ce756f9739aa28cd 100644 (file)
@@ -117,7 +117,7 @@ static void ali14xx_tune_drive (ide_drive_t *drive, u8 pio)
        unsigned long flags;
        int bus_speed = system_bus_clock();
 
-       pio = ide_get_best_pio_mode(drive, pio, ALI_MAX_PIO, NULL);
+       pio = ide_get_best_pio_mode(drive, pio, ALI_MAX_PIO);
 
        /* calculate timing, according to PIO mode */
        time1 = ide_pio_cycle_time(drive, pio);
index 36a3f0ac61628767f8ca555d9a476a1101b89bb9..8c4c27e5dc109477e4adfd43acbee1c947046d7e 100644 (file)
@@ -71,7 +71,7 @@ static void tune_dtc2278 (ide_drive_t *drive, u8 pio)
 {
        unsigned long flags;
 
-       pio = ide_get_best_pio_mode(drive, pio, 4, NULL);
+       pio = ide_get_best_pio_mode(drive, pio, 4);
 
        if (pio >= 3) {
                spin_lock_irqsave(&ide_lock, flags);
index 85d16812d90244426b73566e7ca3a73880468609..82ed37df9566a7661f97bf6c436ec17b1090a780 100644 (file)
@@ -208,7 +208,7 @@ static u8 ht_pio2timings(ide_drive_t *drive, u8 pio)
         if (pio) {
                unsigned int cycle_time;
 
-               pio = ide_get_best_pio_mode(drive, pio, 5, NULL);
+               pio = ide_get_best_pio_mode(drive, pio, 5);
                cycle_time = ide_pio_cycle_time(drive, pio);
 
                /*
index 233905b08e93392e4f324765e34e94eddf6ce3ea..39145102b348590299b8a559caf82c20f37bf7f8 100644 (file)
@@ -258,7 +258,7 @@ static void qd6580_tune_drive (ide_drive_t *drive, u8 pio)
        int recovery_time = 415; /* worst case values from the dos driver */
 
        if (drive->id && !qd_find_disk_type(drive, &active_time, &recovery_time)) {
-               pio = ide_get_best_pio_mode(drive, pio, 4, NULL);
+               pio = ide_get_best_pio_mode(drive, pio, 4);
                cycle_time = ide_pio_cycle_time(drive, pio);
 
                switch (pio) {
index ddc403a0bd829dee9fef1c0fd4ca2f2afb3ce4c9..caeebd41081ffa3d73f17a28674301bff9d4c841 100644 (file)
@@ -110,7 +110,7 @@ static void tune_umc (ide_drive_t *drive, u8 pio)
        unsigned long flags;
        ide_hwgroup_t *hwgroup = ide_hwifs[HWIF(drive)->index^1].hwgroup;
 
-       pio = ide_get_best_pio_mode(drive, pio, 4, NULL);
+       pio = ide_get_best_pio_mode(drive, pio, 4);
        printk("%s: setting umc8672 to PIO mode%d (speed %d)\n",
                drive->name, pio, pio_to_umc[pio]);
        spin_lock_irqsave(&ide_lock, flags);
index 2e7013a2a7f635073eefef53498a54698e095fe5..b0d13c34d3102ac38b0dafab94ca31d0f8499ceb 100644 (file)
@@ -106,7 +106,7 @@ static void auide_tune_drive(ide_drive_t *drive, byte pio)
        u8 speed;
 
        /* get the best pio mode for the drive */
-       pio = ide_get_best_pio_mode(drive, pio, 4, NULL);
+       pio = ide_get_best_pio_mode(drive, pio, 4);
 
        printk(KERN_INFO "%s: setting Au1XXX IDE to PIO mode%d\n",
               drive->name, pio);
index f8ac91c22e64999a4784891f4556e392c3288c30..8396d711f23203a6eb06f4877467e1062e9c93f6 100644 (file)
@@ -142,7 +142,7 @@ static int aec6260_tune_chipset (ide_drive_t *drive, u8 xferspeed)
 
 static void aec62xx_tune_drive (ide_drive_t *drive, u8 pio)
 {
-       pio = ide_get_best_pio_mode(drive, pio, 4, NULL);
+       pio = ide_get_best_pio_mode(drive, pio, 4);
        (void) HWIF(drive)->speedproc(drive, pio + XFER_PIO_0);
 }
 
index 1012da6e8a42abb4ffaf952db6c052602261fba7..a0c43a91b0f33fae4a323c475d0018bcc8fa98c5 100644 (file)
@@ -295,7 +295,6 @@ static int ali_get_info (char *buffer, char **addr, off_t offset, int count)
  
 static u8 ali15x3_tune_pio (ide_drive_t *drive, u8 pio)
 {
-       ide_pio_data_t d;
        ide_hwif_t *hwif = HWIF(drive);
        struct pci_dev *dev = hwif->pci_dev;
        int s_time, a_time, c_time;
@@ -307,7 +306,7 @@ static u8 ali15x3_tune_pio (ide_drive_t *drive, u8 pio)
        u8 cd_dma_fifo = 0;
        int unit = drive->select.b.unit & 1;
 
-       pio = ide_get_best_pio_mode(drive, pio, 5, &d);
+       pio = ide_get_best_pio_mode(drive, pio, 5);
        s_time = ide_pio_timings[pio].setup_time;
        a_time = ide_pio_timings[pio].active_time;
        if ((s_clc = (s_time * bus_speed + 999) / 1000) >= 8)
index 078adbe250d2e1093321cf0b43541fcee505da91..a4740e4776fd53049913815b89f30e36f79bbd8c 100644 (file)
@@ -155,7 +155,7 @@ static void atiixp_tune_pio(ide_drive_t *drive, u8 pio)
 
 static void atiixp_tuneproc(ide_drive_t *drive, u8 pio)
 {
-       pio = ide_get_best_pio_mode(drive, pio, 4, NULL);
+       pio = ide_get_best_pio_mode(drive, pio, 4);
        atiixp_tune_pio(drive, pio);
        (void)ide_config_drive_speed(drive, XFER_PIO_0 + pio);
 }
index 9f67ffc434212d7837e7ca4257ad47ee574ac6ba..335482981a92408efa20abef01f053eaa79c9868 100644 (file)
@@ -661,7 +661,7 @@ static void cmd640_tune_drive (ide_drive_t *drive, u8 mode_wanted)
                        return;
        }
 
-       mode_wanted = ide_get_best_pio_mode(drive, mode_wanted, 5, NULL);
+       mode_wanted = ide_get_best_pio_mode(drive, mode_wanted, 5);
        cycle_time = ide_pio_cycle_time(drive, mode_wanted);
        cmd640_set_mode(index, mode_wanted, cycle_time);
 
index c383f6dc67dd51cc18b91c6b79f557f006c77bb3..9cf969b61bf250dedfde1fd31b4360c70126fff5 100644 (file)
@@ -226,7 +226,7 @@ static u8 cmd64x_tune_pio (ide_drive_t *drive, u8 mode_wanted)
        static const u8 setup_values[] = {0x40, 0x40, 0x40, 0x80, 0, 0xc0};
        static const u8 arttim_regs[4] = {ARTTIM0, ARTTIM1, ARTTIM23, ARTTIM23};
 
-       pio_mode = ide_get_best_pio_mode(drive, mode_wanted, 5, NULL);
+       pio_mode = ide_get_best_pio_mode(drive, mode_wanted, 5);
        cycle_time = ide_pio_cycle_time(drive, pio_mode);
 
        cmdprintk("%s: PIO mode wanted %d, selected %d (%d ns)\n",
index 5539a25eae99290c6281d30c1bf379182316c0de..ee10e48d7cef6f35a20980f9ba1648ba5e4e5920 100644 (file)
@@ -126,7 +126,7 @@ static int cs5520_tune_chipset(ide_drive_t *drive, u8 xferspeed)
        
 static void cs5520_tune_drive(ide_drive_t *drive, u8 pio)
 {
-       pio = ide_get_best_pio_mode(drive, pio, 4, NULL);
+       pio = ide_get_best_pio_mode(drive, pio, 4);
        cs5520_tune_chipset(drive, (XFER_PIO_0 + pio));
 }
 
index 643d66cc672963c61b46fc2dce437e41e739717b..a75c14a9318285138ab88b3d2a6e2d99149f4be2 100644 (file)
@@ -82,7 +82,7 @@ static void cs5530_tunepio(ide_drive_t *drive, u8 pio)
 
 static void cs5530_tuneproc (ide_drive_t *drive, u8 pio)       /* pio=255 means "autotune" */
 {
-       pio = ide_get_best_pio_mode(drive, pio, 4, NULL);
+       pio = ide_get_best_pio_mode(drive, pio, 4);
 
        if (cs5530_set_xfer_mode(drive, XFER_PIO_0 + pio) == 0)
                cs5530_tunepio(drive, pio);
index 5039793721446b3190ec8230082fe11fd70e9ea3..0bff4005292a4ccf48d49879ce4d48885a45d0fe 100644 (file)
@@ -89,7 +89,7 @@ static void cs5535_set_speed(ide_drive_t *drive, u8 speed)
 
                pioa = speed - XFER_PIO_0;
                piob = ide_get_best_pio_mode(&(drive->hwif->drives[!unit]),
-                                               255, 4, NULL);
+                                               255, 4);
                cmd = pioa < piob ? pioa : piob;
 
                /* Write the speed of the current drive */
@@ -159,7 +159,7 @@ static void cs5535_tuneproc(ide_drive_t *drive, u8 xferspeed)
        /* cs5535 max pio is pio 4, best_pio will check the blacklist.
        i think we don't need to rate_filter the incoming xferspeed
        since we know we're only going to choose pio */
-       xferspeed = ide_get_best_pio_mode(drive, xferspeed, 4, NULL);
+       xferspeed = ide_get_best_pio_mode(drive, xferspeed, 4);
        ide_config_drive_speed(drive, modes[xferspeed]);
        cs5535_set_speed(drive, xferspeed);
 }
@@ -174,7 +174,7 @@ static int cs5535_dma_check(ide_drive_t *drive)
                return 0;
 
        if (ide_use_fast_pio(drive)) {
-               speed = ide_get_best_pio_mode(drive, 255, 4, NULL);
+               speed = ide_get_best_pio_mode(drive, 255, 4);
                cs5535_set_drive(drive, speed);
        }
 
index 995b7256361335c88dfb3a670951ef285a00352e..cb7c18187e3c7acd3a916cc7f31a7062950af870 100644 (file)
@@ -330,7 +330,7 @@ static void cy82c693_tune_drive (ide_drive_t *drive, u8 pio)
 #endif /* CY82C693_DEBUG_LOGS */
 
        /* first let's calc the pio modes */
-       pio = ide_get_best_pio_mode(drive, pio, CY82C693_MAX_PIO, NULL);
+       pio = ide_get_best_pio_mode(drive, pio, CY82C693_MAX_PIO);
 
 #if CY82C693_DEBUG_INFO
        printk (KERN_INFO "%s: Selected PIO mode %d\n", drive->name, pio);
index 6d2ef0ee0f2b69403615475c8f600f0db54720cf..2e4591303f4feb945f2a7f385268d88e4b969477 100644 (file)
@@ -80,7 +80,7 @@ static int hpt34x_tune_chipset (ide_drive_t *drive, u8 xferspeed)
 
 static void hpt34x_tune_drive (ide_drive_t *drive, u8 pio)
 {
-       pio = ide_get_best_pio_mode(drive, pio, 5, NULL);
+       pio = ide_get_best_pio_mode(drive, pio, 5);
        (void) hpt34x_tune_chipset(drive, (XFER_PIO_0 + pio));
 }
 
index 182346a04f36feaf5043b902f88e730eea7a0cb8..0a3fe9471eb62143dfb7df20cb1c6b15cc180e44 100644 (file)
@@ -652,7 +652,7 @@ static int hpt3xx_tune_chipset(ide_drive_t *drive, u8 speed)
 
 static void hpt3xx_tune_drive(ide_drive_t *drive, u8 pio)
 {
-       pio = ide_get_best_pio_mode(drive, pio, 4, NULL);
+       pio = ide_get_best_pio_mode(drive, pio, 4);
        (void) hpt3xx_tune_chipset (drive, XFER_PIO_0 + pio);
 }
 
index 684b0ec79f41b6cb5a55af382ab333dc45db2e77..d8425a2499bf48515bf5d541b1f564d904dee54b 100644 (file)
@@ -82,7 +82,7 @@ static void it8213_tuneproc (ide_drive_t *drive, u8 pio)
                                        { 2, 1 },
                                        { 2, 3 }, };
 
-       pio = ide_get_best_pio_mode(drive, pio, 4, NULL);
+       pio = ide_get_best_pio_mode(drive, pio, 4);
 
        spin_lock_irqsave(&tune_lock, flags);
        pci_read_config_word(dev, master_port, &master_data);
@@ -214,7 +214,7 @@ static int it8213_config_drive_for_dma (ide_drive_t *drive)
        if (ide_tune_dma(drive))
                return 0;
 
-       pio = ide_get_best_pio_mode(drive, 255, 4, NULL);
+       pio = ide_get_best_pio_mode(drive, 255, 4);
        it8213_tune_chipset(drive, XFER_PIO_0 + pio);
 
        return -1;
index faccb2d4af43abb5fddf41343875257d56289367..790233db017b087a9152a95f30500a87c425514c 100644 (file)
@@ -255,7 +255,7 @@ static int it821x_tunepio(ide_drive_t *drive, u8 set_pio)
         * on the cable.
         */
        if (pair) {
-               u8 pair_pio = ide_get_best_pio_mode(pair, 255, 4, NULL);
+               u8 pair_pio = ide_get_best_pio_mode(pair, 255, 4);
                /* trim PIO to the slowest of the master/slave */
                if (pair_pio < set_pio)
                        set_pio = pair_pio;
@@ -276,7 +276,7 @@ static int it821x_tunepio(ide_drive_t *drive, u8 set_pio)
 
 static void it821x_tuneproc(ide_drive_t *drive, u8 pio)
 {
-       pio = ide_get_best_pio_mode(drive, pio, 4, NULL);
+       pio = ide_get_best_pio_mode(drive, pio, 4);
        (void)it821x_tunepio(drive, pio);
 }
 
index 0edb9cd458544ad5438fa28f1dc6b98e5afdfefa..57d3d4186b3fcd1225646e12693a41a48587a5b2 100644 (file)
@@ -97,7 +97,7 @@ static void jmicron_tuneproc (ide_drive_t *drive, byte mode_wanted)
 
 static void config_jmicron_chipset_for_pio (ide_drive_t *drive, byte set_speed)
 {
-       u8 speed = XFER_PIO_0 + ide_get_best_pio_mode(drive, 255, 5, NULL);
+       u8 speed = XFER_PIO_0 + ide_get_best_pio_mode(drive, 255, 5);
        if (set_speed)
                (void) ide_config_drive_speed(drive, speed);
 }
index 78d7adf2d0b06eb801d6e9719bb4cce61233bd45..1802ad0927eb00fcea737dd63edccdf7466b3527 100644 (file)
@@ -147,12 +147,12 @@ static void compute_pios(ide_drive_t *drive, u8 pio)
        int d;
        ide_hwif_t *hwif = HWIF(drive);
 
-       drive->drive_data = ide_get_best_pio_mode(drive, pio, OPTI621_MAX_PIO, NULL);
+       drive->drive_data = ide_get_best_pio_mode(drive, pio, OPTI621_MAX_PIO);
        for (d = 0; d < 2; ++d) {
                drive = &hwif->drives[d];
                if (drive->present) {
                        if (drive->drive_data == PIO_DONT_KNOW)
-                               drive->drive_data = ide_get_best_pio_mode(drive, 255, OPTI621_MAX_PIO, NULL);
+                               drive->drive_data = ide_get_best_pio_mode(drive, 255, OPTI621_MAX_PIO);
 #ifdef OPTI621_DEBUG
                        printk("%s: Selected PIO mode %d\n",
                                drive->name, drive->drive_data);
index f8508d9cccd31239948c510aa1c8b931b715fa07..a8a01b4ab607a2c158b4db54b00678d0fdd8dd42 100644 (file)
@@ -219,7 +219,7 @@ static int pdcnew_tune_chipset(ide_drive_t *drive, u8 speed)
 
 static void pdcnew_tune_drive(ide_drive_t *drive, u8 pio)
 {
-       pio = ide_get_best_pio_mode(drive, pio, 4, NULL);
+       pio = ide_get_best_pio_mode(drive, pio, 4);
        (void)pdcnew_tune_chipset(drive, XFER_PIO_0 + pio);
 }
 
index eb4e4a61d06e73a8d5ee70e2dc0e175cc0de686c..3a6882d4aa644a36ecfc5c8bac27ce16f14621f0 100644 (file)
@@ -145,7 +145,7 @@ static int pdc202xx_tune_chipset (ide_drive_t *drive, u8 xferspeed)
 
 static void pdc202xx_tune_drive(ide_drive_t *drive, u8 pio)
 {
-       pio = ide_get_best_pio_mode(drive, pio, 4, NULL);
+       pio = ide_get_best_pio_mode(drive, pio, 4);
        pdc202xx_tune_chipset(drive, XFER_PIO_0 + pio);
 }
 
index a4f88d25b16d344085fa735b10de16cd3126ad34..41a3612c61074c7f57834376f8751fb2085ef402 100644 (file)
@@ -219,7 +219,7 @@ static void piix_tune_pio (ide_drive_t *drive, u8 pio)
  */
 static void piix_tune_drive (ide_drive_t *drive, u8 pio)
 {
-       pio = ide_get_best_pio_mode(drive, pio, 4, NULL);
+       pio = ide_get_best_pio_mode(drive, pio, 4);
        piix_tune_pio(drive, pio);
        (void) ide_config_drive_speed(drive, XFER_PIO_0 + pio);
 }
index 9ac8889f8ad389f6f2306d81577ba32a32ab85c8..98e1a2bd9501c591f3a357c27dead6a9818005da 100644 (file)
@@ -304,7 +304,7 @@ static void sc1200_tuneproc (ide_drive_t *drive, byte pio)  /* mode=255 means "au
                return;
        }
 
-       pio = ide_get_best_pio_mode(drive, pio, 4, NULL);
+       pio = ide_get_best_pio_mode(drive, pio, 4);
        printk("SC1200: %s: setting PIO mode%d\n", drive->name, pio);
 
        if (sc1200_set_xfer_mode(drive, XFER_PIO_0 + pio) == 0)
index a1954d1c287987c03403ccdbea926519444c240f..2c76355b92e8ca34e18b5be9962c6d13c3b7d5d5 100644 (file)
@@ -210,7 +210,7 @@ static void scc_tuneproc(ide_drive_t *drive, byte mode_wanted)
        unsigned char speed = XFER_PIO_0;
        int offset;
 
-       mode_wanted = ide_get_best_pio_mode(drive, mode_wanted, 4, NULL);
+       mode_wanted = ide_get_best_pio_mode(drive, mode_wanted, 4);
        switch (mode_wanted) {
        case 4:
                speed = XFER_PIO_4;
index abc3cd58aaa9a71f7dd3b13ddd1a1626dbf988ae..1fe29d9e68fa5c6c57b4abb7e1473c965cf4e493 100644 (file)
@@ -205,7 +205,7 @@ static int svwks_tune_chipset (ide_drive_t *drive, u8 xferspeed)
 
 static void svwks_tune_drive (ide_drive_t *drive, u8 pio)
 {
-       pio = ide_get_best_pio_mode(drive, pio, 4, NULL);
+       pio = ide_get_best_pio_mode(drive, pio, 4);
        svwks_tune_pio(drive, pio);
        (void)ide_config_drive_speed(drive, XFER_PIO_0 + pio);
 }
index 47b9b94afe05ce7c863858e516ee9cd66a95288e..63a8a93d63d67f32e9d838551a6ce795d188cb17 100644 (file)
@@ -189,7 +189,7 @@ static void sil_tune_pio(ide_drive_t *drive, u8 pio)
 
        /* trim *taskfile* PIO to the slowest of the master/slave */
        if (pair->present) {
-               u8 pair_pio = ide_get_best_pio_mode(pair, 255, 4, NULL);
+               u8 pair_pio = ide_get_best_pio_mode(pair, 255, 4);
 
                if (pair_pio < tf_pio)
                        tf_pio = pair_pio;
@@ -221,7 +221,7 @@ static void sil_tune_pio(ide_drive_t *drive, u8 pio)
 
 static void sil_tuneproc(ide_drive_t *drive, u8 pio)
 {
-       pio = ide_get_best_pio_mode(drive, pio, 4, NULL);
+       pio = ide_get_best_pio_mode(drive, pio, 4);
        sil_tune_pio(drive, pio);
        (void)ide_config_drive_speed(drive, XFER_PIO_0 + pio);
 }
index bbc5020875784e151dfd65f3db365a7a4b07062c..3c4693695ca38855d745b04d3ce50b471689e953 100644 (file)
@@ -521,7 +521,7 @@ static void config_art_rwp_pio (ide_drive_t *drive, u8 pio)
 
 static int sis5513_tune_drive(ide_drive_t *drive, u8 pio)
 {
-       pio = ide_get_best_pio_mode(drive, pio, 4, NULL);
+       pio = ide_get_best_pio_mode(drive, pio, 4);
        config_art_rwp_pio(drive, pio);
        return ide_config_drive_speed(drive, XFER_PIO_0 + pio);
 }
index cc5f69b7514feaa02c0be59d9a4383df7d8deaa4..4e8f32e643a60bf43107bfdd78fb223e932d201d 100644 (file)
@@ -83,7 +83,7 @@ static u8 sl82c105_tune_pio(ide_drive_t *drive, u8 pio)
 
        DBG(("sl82c105_tune_pio(drive:%s, pio:%u)\n", drive->name, pio));
 
-       pio = ide_get_best_pio_mode(drive, pio, 5, NULL);
+       pio = ide_get_best_pio_mode(drive, pio, 5);
 
        drv_ctrl = get_pio_timings(drive, pio);
 
index 115bcaefc8eec1f259dc6895573c1056c49cb63a..562747fbee392812f2ab980397868ffc318e1ff1 100644 (file)
@@ -103,7 +103,7 @@ static void slc90e66_tune_pio (ide_drive_t *drive, u8 pio)
 
 static void slc90e66_tune_drive (ide_drive_t *drive, u8 pio)
 {
-       pio = ide_get_best_pio_mode(drive, pio, 4, NULL);
+       pio = ide_get_best_pio_mode(drive, pio, 4);
        slc90e66_tune_pio(drive, pio);
        (void) ide_config_drive_speed(drive, XFER_PIO_0 + pio);
 }
index 1d40b0820f509922855ead0e7e9543c75c3b0c62..2479a19f0094040dc0c4a90e010c232774e1f587 100644 (file)
@@ -47,7 +47,7 @@ static int tc86c001_tune_chipset(ide_drive_t *drive, u8 speed)
 
 static void tc86c001_tune_drive(ide_drive_t *drive, u8 pio)
 {
-       pio =  ide_get_best_pio_mode(drive, pio, 4, NULL);
+       pio = ide_get_best_pio_mode(drive, pio, 4);
        (void) tc86c001_tune_chipset(drive, XFER_PIO_0 + pio);
 }
 
index 801314fe3524e622da3cafb5576d10bb08f40745..f8fef905baccdea965b6782e276f9760a2d89880 100644 (file)
@@ -96,7 +96,7 @@ static int triflex_tune_chipset(ide_drive_t *drive, u8 xferspeed)
 
 static void triflex_tune_drive(ide_drive_t *drive, u8 pio)
 {
-       int use_pio = ide_get_best_pio_mode(drive, pio, 4, NULL);
+       int use_pio = ide_get_best_pio_mode(drive, pio, 4);
        (void) triflex_tune_chipset(drive, (XFER_PIO_0 + use_pio));
 }
 
index 82de2d781f2ea24da3b1c8e0c49d907d03b1d4bb..f3789c0e6cc99bc20beb4851499f34fb90083c01 100644 (file)
@@ -431,13 +431,12 @@ void m8xx_ide_init_hwif_ports (hw_regs_t *hw,
 static void
 m8xx_ide_tuneproc(ide_drive_t *drive, u8 pio)
 {
-       ide_pio_data_t d;
 #if defined(CONFIG_IDE_8xx_PCCARD) || defined(CONFIG_IDE_8xx_DIRECT)
        volatile pcmconf8xx_t   *pcmp;
        ulong timing, mask, reg;
 #endif
 
-       pio = ide_get_best_pio_mode(drive, pio, 4, &d);
+       pio = ide_get_best_pio_mode(drive, pio, 4);
 
 #if 1
        printk("%s[%d] %s: best PIO mode: %d\n",
index 669330521fc1509497a0d61f85f60725dd1ccdff..debaa8823f517073b64b0e7f96877ae43a80d377 100644 (file)
@@ -627,7 +627,7 @@ pmac_ide_tuneproc(ide_drive_t *drive, u8 pio)
        /* which drive is it ? */
        timings = &pmif->timings[drive->select.b.unit & 0x01];
 
-       pio = ide_get_best_pio_mode(drive, pio, 4, NULL);
+       pio = ide_get_best_pio_mode(drive, pio, 4);
        cycle_time = ide_pio_cycle_time(drive, pio);
 
        switch (pmif->kind) {
index 0afa52c14ffaefc980e4e3597a86020882fe0a76..14a87f619d17c538e158d9d10425b1d753eb3808 100644 (file)
@@ -1377,12 +1377,8 @@ typedef struct ide_pio_timings_s {
                                /* active + recovery (+ setup for some chips) */
 } ide_pio_timings_t;
 
-typedef struct ide_pio_data_s {
-       u8 pio_mode;
-} ide_pio_data_t;
-
 unsigned int ide_pio_cycle_time(ide_drive_t *, u8);
-extern u8 ide_get_best_pio_mode (ide_drive_t *drive, u8 mode_wanted, u8 max_mode, ide_pio_data_t *d);
+u8 ide_get_best_pio_mode(ide_drive_t *, u8, u8);
 extern const ide_pio_timings_t ide_pio_timings[6];