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

Commit ccf35289 authored by Bartlomiej Zolnierkiewicz's avatar Bartlomiej Zolnierkiewicz
Browse files

ide: make ide_hwif_t.ide_dma_host_on void (v2)



* since ide_hwif_t.ide_dma_host_on is called either when drive->using_dma == 1
  or when return value is discarded make it void, also drop "ide_" prefix
* make __ide_dma_host_on() void and drop "__" prefix

v2:
* while at it rename atiixp_ide_dma_host_on() to atiixp_dma_host_on()
  and sgiioc4_ide_dma_host_on() to sgiioc4_dma_host_on().
  [ Noticed by Sergei Shtylyov <sshtylyov@ru.mvista.com>. ]

Signed-off-by: default avatarBartlomiej Zolnierkiewicz <bzolnier@gmail.com>
parent 7469aaf6
Loading
Loading
Loading
Loading
+4 −4
Original line number Diff line number Diff line
@@ -316,15 +316,15 @@ static void icside_dma_off_quietly(ide_drive_t *drive)
	drive->using_dma = 0;
}

static int icside_dma_host_on(ide_drive_t *drive)
static void icside_dma_host_on(ide_drive_t *drive)
{
	return 0;
}

static int icside_dma_on(ide_drive_t *drive)
{
	drive->using_dma = 1;
	return icside_dma_host_on(drive);

	return 0;
}

static int icside_dma_check(ide_drive_t *drive)
@@ -494,7 +494,7 @@ static void icside_dma_init(ide_hwif_t *hwif)
	hwif->ide_dma_check	= icside_dma_check;
	hwif->dma_host_off	= icside_dma_host_off;
	hwif->dma_off_quietly	= icside_dma_off_quietly;
	hwif->ide_dma_host_on	= icside_dma_host_on;
	hwif->dma_host_on	= icside_dma_host_on;
	hwif->ide_dma_on	= icside_dma_on;
	hwif->dma_setup		= icside_dma_setup;
	hwif->dma_exec_cmd	= icside_dma_exec_cmd;
+1 −1
Original line number Diff line number Diff line
@@ -818,7 +818,7 @@ init_e100_ide (void)
		hwif->INB = &cris_ide_inb;
		hwif->INW = &cris_ide_inw;
		hwif->dma_host_off = &cris_dma_off;
		hwif->ide_dma_host_on = &cris_dma_on;
		hwif->dma_host_on = &cris_dma_on;
		hwif->dma_off_quietly = &cris_dma_off;
		hwif->udma_four = 0;
		hwif->ultra_mask = cris_ultra_mask;
+7 −10
Original line number Diff line number Diff line
@@ -468,14 +468,14 @@ EXPORT_SYMBOL(ide_dma_off);

#ifdef CONFIG_BLK_DEV_IDEDMA_PCI
/**
 *	__ide_dma_host_on	-	Enable DMA on a host
 *	ide_dma_host_on	-	Enable DMA on a host
 *	@drive: drive to enable for DMA
 *
 *	Enable DMA on an IDE controller following generic bus mastering
 *	IDE controller behaviour
 */

int __ide_dma_host_on (ide_drive_t *drive)
void ide_dma_host_on(ide_drive_t *drive)
{
	if (drive->using_dma) {
		ide_hwif_t *hwif	= HWIF(drive);
@@ -483,12 +483,10 @@ int __ide_dma_host_on (ide_drive_t *drive)
		u8 dma_stat		= hwif->INB(hwif->dma_status);

		hwif->OUTB((dma_stat|(1<<(5+unit))), hwif->dma_status);
		return 0;
	}
	return 1;
}

EXPORT_SYMBOL(__ide_dma_host_on);
EXPORT_SYMBOL(ide_dma_host_on);

/**
 *	__ide_dma_on		-	Enable DMA on a device
@@ -506,8 +504,7 @@ int __ide_dma_on (ide_drive_t *drive)
	drive->using_dma = 1;
	ide_toggle_bounce(drive, 1);

	if (HWIF(drive)->ide_dma_host_on(drive))
		return 1;
	drive->hwif->dma_host_on(drive);

	return 0;
}
@@ -940,8 +937,8 @@ void ide_setup_dma (ide_hwif_t *hwif, unsigned long dma_base, unsigned int num_p
		hwif->dma_host_off = &ide_dma_host_off;
	if (!hwif->ide_dma_on)
		hwif->ide_dma_on = &__ide_dma_on;
	if (!hwif->ide_dma_host_on)
		hwif->ide_dma_host_on = &__ide_dma_host_on;
	if (!hwif->dma_host_on)
		hwif->dma_host_on = &ide_dma_host_on;
	if (!hwif->ide_dma_check)
		hwif->ide_dma_check = &__ide_dma_check;
	if (!hwif->dma_setup)
+1 −1
Original line number Diff line number Diff line
@@ -830,7 +830,7 @@ int ide_config_drive_speed (ide_drive_t *drive, u8 speed)

#ifdef CONFIG_BLK_DEV_IDEDMA
	if (speed >= XFER_SW_DMA_0)
		hwif->ide_dma_host_on(drive);
		hwif->dma_host_on(drive);
	else if (hwif->ide_dma_check)	/* check if host supports DMA */
		hwif->dma_off_quietly(drive);
#endif
+1 −1
Original line number Diff line number Diff line
@@ -509,7 +509,7 @@ static void ide_hwif_restore(ide_hwif_t *hwif, ide_hwif_t *tmp_hwif)
	hwif->dma_off_quietly		= tmp_hwif->dma_off_quietly;
	hwif->ide_dma_test_irq		= tmp_hwif->ide_dma_test_irq;
	hwif->ide_dma_clear_irq		= tmp_hwif->ide_dma_clear_irq;
	hwif->ide_dma_host_on		= tmp_hwif->ide_dma_host_on;
	hwif->dma_host_on		= tmp_hwif->dma_host_on;
	hwif->dma_host_off		= tmp_hwif->dma_host_off;
	hwif->ide_dma_lostirq		= tmp_hwif->ide_dma_lostirq;
	hwif->ide_dma_timeout		= tmp_hwif->ide_dma_timeout;
Loading