Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 2134758d authored by Bartlomiej Zolnierkiewicz's avatar Bartlomiej Zolnierkiewicz
Browse files

ide: drop "PIO data" argument from ide_get_best_pio_mode()



* 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: default avatarSergei Shtylyov <sshtylyov@ru.mvista.com>
Signed-off-by: default avatarBartlomiej Zolnierkiewicz <bzolnier@gmail.com>
parent e5fa4b29
Loading
Loading
Loading
Loading
+1 −5
Original line number Original line Diff line number Diff line
@@ -277,7 +277,6 @@ EXPORT_SYMBOL_GPL(ide_pio_cycle_time);
 *	@drive: drive to consider
 *	@drive: drive to consider
 *	@mode_wanted: preferred mode
 *	@mode_wanted: preferred mode
 *	@max_mode: highest allowed mode
 *	@max_mode: highest allowed mode
 *	@d: PIO data
 *
 *
 *	This routine returns the recommended PIO settings for a given drive,
 *	This routine returns the recommended PIO settings for a given drive,
 *	based on the drive->id information and the ide_pio_blacklist[].
 *	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".
 *	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;
	int pio_mode;
	struct hd_driveid* id = drive->id;
	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)
	if (pio_mode > max_mode)
		pio_mode = max_mode;
		pio_mode = max_mode;


	if (d)
		d->pio_mode = pio_mode;

	return pio_mode;
	return pio_mode;
}
}


+1 −1
Original line number Original line Diff line number Diff line
@@ -117,7 +117,7 @@ static void ali14xx_tune_drive (ide_drive_t *drive, u8 pio)
	unsigned long flags;
	unsigned long flags;
	int bus_speed = system_bus_clock();
	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 */
	/* calculate timing, according to PIO mode */
	time1 = ide_pio_cycle_time(drive, pio);
	time1 = ide_pio_cycle_time(drive, pio);
+1 −1
Original line number Original line Diff line number Diff line
@@ -71,7 +71,7 @@ static void tune_dtc2278 (ide_drive_t *drive, u8 pio)
{
{
	unsigned long flags;
	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) {
	if (pio >= 3) {
		spin_lock_irqsave(&ide_lock, flags);
		spin_lock_irqsave(&ide_lock, flags);
+1 −1
Original line number Original line Diff line number Diff line
@@ -208,7 +208,7 @@ static u8 ht_pio2timings(ide_drive_t *drive, u8 pio)
        if (pio) {
        if (pio) {
		unsigned int cycle_time;
		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);
		cycle_time = ide_pio_cycle_time(drive, pio);


		/*
		/*
+1 −1
Original line number Original line Diff line number Diff line
@@ -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 */
	int recovery_time = 415; /* worst case values from the dos driver */


	if (drive->id && !qd_find_disk_type(drive, &active_time, &recovery_time)) {
	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);
		cycle_time = ide_pio_cycle_time(drive, pio);


		switch (pio) {
		switch (pio) {
Loading